Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails + carrierwave + fog + S3 socket error

I'm having this problem trying to use S3 services with fog and the Jquery File Upload (https://github.com/blueimp/jQuery-File-Upload)

The error

Excon::Errors::SocketError (getaddrinfo: nodename nor servname provided, or not known (SocketError)): 

This occur when i try to call "save" method in the controller. I'm setting carrierwave as follow:

config/initializers/carrierwave.rb

CarrierWave.configure do |config|
  config.fog_credentials = {
    :provider               => 'AWS', 
    :aws_access_key_id      => 'access_key_here', 
    :aws_secret_access_key  => 'secret_key_here', 
    :region                 => 'eu-east-1'
  }
  config.fog_directory  = 'folder_name_here'
  config.fog_public     = false 
  config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
  config.storage = :fog
end

and my uploader just the "config.storage :fog" and the "store_dir" Now, I have created my bucket already.

Am i missing some configuration? It doesn't even work on my dev environment.

Please any help. Thanks in advance.

like image 931
Ron Avatar asked Aug 23 '12 22:08

Ron


1 Answers

The region name is wrong. It should be 'us-east-1'

like image 145
Ron Avatar answered Nov 10 '22 20:11

Ron