I am using paperclip to handle image uploads in my Rails app. All works fine running in the development environment locally using the File Storage.
Now I am trying to get this working using S3 (because the app is to run on Heroku). I have set up a bucket and set the appropriate parameters in development.rb and production.rb as per the instructions here: https://devcenter.heroku.com/articles/paperclip-s3
When I start the server, I get the following error:
/Users/ganzogo/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.13/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `paperclip' for #<Rails::Application::Configuration:0x007fcb8b952000> (NoMethodError)
from /Users/ganzogo/Documents/acknowledgement/true-rails/config/environments/development.rb:41:in `block in <top (required)>'
And then it crashes.
The line referred to in the error is:
config.paperclip.defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => ENV['S3_BUCKET_NAME'],
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
}
}
I get exactly the same error if I try to run on Heroku. Has anyone been through this and have any idea what I have missed?