gem "mini_magick"
gem "refile", require: ["refile/rails", "refile/image_processing"]
gem "aws-sdk"
My config / initializers / refile.rb file
require "refile/backend/s3"
aws = {
access_key_id: ENV['S3_ACCESS_KEY'],
secret_access_key: ENV['S3_SECRET_ACCESS_KEY'],
bucket: ENV['S3_BUCKET'],
}
Refile.cache = Refile::Backend::S3.new(prefix: "cache", **aws)
Refile.store = Refile::Backend::S3.new(prefix: "store", **aws)
When I run rails, it shows this error:
/usr/local/Cellar/ruby/2.2.0/lib/ruby/gems/2.2.0/gems/refile-0.4.2/lib/refile/backend/s3.rb:14:in 'initialize' : uninitialized constant Refile :: Backend :: S3 :: AWS (NameError)