简体   繁体   中英

Error after configuring aws

This is my error message:

Excon::Error::Socket in Admin::ProductsController#update

Broken pipe (Errno::EPIPE)

Extracted source (around line #386):

  def write_nonblock(s, exception: true)
    flush
    syswrite_nonblock(s, exception: exception)
  end

My initializer looks like this...

CarrierWave.configure do |config|
  config.fog_provider = 'fog/aws'                        
  config.fog_credentials = {
    provider:              'AWS',                        
    aws_access_key_id:     'X',                       
    aws_secret_access_key: 'X',                       
    region:                'eu-west-2',                 
    host:                  's3.eu-west-2.amazonaws.com'
  config.fog_directory  = 'xxxx'                         
end

Did not configure ideally

You can follow like this

CarrierWave.configure do |config|
   config.fog_credentials = {
     :provider              => 'AWS',
     :aws_access_key_id     => 'aws_access_key_id',
     :aws_secret_access_key => 'aws_secret_access_key ',
     :region                => 'eu-west-2'
   } #=> end credentials
   config.fog_directory    = 'bucket-name'
end

For more explanation, you can follow this

I think will help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM