3
votes

I've updated rails from 5.1.4 to 5.2 and remove Papaerclip to use Active Storage. I'm using digitalocean spaces. In my development env I've setted credentials in storage.yml to save images to digitalocean.

I've added aws gem in gemfile. I run db:migrate for active storage.

But when I'm going to submit the form with an image upload html tag, i receive this error: Unable to autoload constant ActiveStorage::Blob::Analyzable.

Anyone can help me?

1

1 Answers

0
votes

I had the same problem and I fixe it creating new project from scratch and error disapears. I know that maybe you can't do this and I've look for possible diferences between project with the error and the new one.

The only diference I could find is about Rails credentials. With new projects using Rails 5.2, Rails is creating credentials automatically. You could check if you have credentials enabled because you will see credentials.yml.enc and master.key in you config folder.

If you don't have it, try to enable it using this tutorial https://medium.com/cedarcode/rails-5-2-credentials-9b3324851336

Hope it helps!