Issues using Carrier wave with Google Cloud Storage

52 views
Skip to first unread message

Tameem Iftikhar

unread,
Mar 20, 2019, 2:52:17 PM3/20/19
to carrierwave

Hi,


I have a simple setup of CarrierWave to upload to Google Cloud Storage. The uploads work sometimes and quite frequently I run into this error. After a few tries I am able to upload the image, and sometimes first try it fails as well:

Completed 500 Internal Server Error in 39ms (ActiveRecord: 2.5ms)

Excon::Error::Socket (end of file reached (EOFError)):
  
app/controllers/my_controller.rb:73:in `image_upload'



I am on the latest version of the gems:


fog-google (1.8.2)
carrierwave (1.3.1)
fog-core (2.1.0)


The config is as follows:

CarrierWave.configure do |config|
    config.fog_provider = 'fog/google'                        # required
    config.fog_credentials = {
      provider:                         'Google',
      google_storage_access_key_id:     '*****',
      google_storage_secret_access_key: '*****'
    }
    config.fog_directory = 'images'
end

Reply all
Reply to author
Forward
0 new messages