Rails 6 Active storage setup - NameError Exception: uninitialized constant #<Class:0x00007fddde3597d8>::Analyzable
I'm setting active storage with s3 in Rails 6.
- I did rails
- In development.rb, i added:
config.active_storage.service = :amazon
- I added
gem "aws-sdk-s3", require: falsein my gemfile.
- My model has this:
- This is my storage.yml.
test: service: Disk root: <%= Rails.root.join("tmp/storage") %> local: service: Disk root: <%= Rails.root.join("storage") %> amazon: service: "S3" access_key_id: xxxx secret_access_key: xxxx region: xxxx bucket: xxxx
But on calling
model.photo.attach(params[:photo']), i'm getting this error.
*** NameError Exception: uninitialized constant #<Class:0x00007fddde3597d8>::Analyzable
My yml seems to be correct, i already checked it in yml validator. But,
Any suggestions would help.
I'm having trouble setting up S3 to work with Active Storage on a Heroku environment.
Would you mind sharing your setup, please?