Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails refinerycms s3 upload error

I'm trying to configure RefineryCMS to use Fog for S3 uploads. Here's the error I'm getting:

ArgumentError in Refinery::Admin::ImagesController#create
The following keys are invalid: :url

My configuration in config/initializers/refinery/core.rb:

config.s3_bucket_name = '(mybucket)'
config.s3_access_key_id = '(mykey)'
config.s3_secret_access_key = '(mysecret)'
config.s3_backend = true

Any ideas?

like image 328
Tyler Avatar asked Feb 24 '13 04:02

Tyler


2 Answers

I just encountered the same issue, although in a different setup (dragonfly with S3 datastore). Seems like fog is the issue.

Try to use an older version of fog. I updated my Gemfile to use an older version of fog.

gem 'fog', '1.4.0'

and then run

bundle install

I tried every single version from 1.9.0 to 1.4.0, and 1.4.0 was the first version where my uploads were working again. I will update my post if I find a way to get this working with 1.9.0

like image 132
kroofy Avatar answered Oct 20 '22 03:10

kroofy


Here's a quick fix. Stick in an initializer.

module Excon
 class Connection
   VALID_CONNECTION_KEYS << :url
 end 
end
like image 22
enzo Avatar answered Oct 20 '22 03:10

enzo