Error copying aws-sdk: uninitialized constant

I am currently running an error uninitialized constant Paperclip::Storage::S3::AWSwhile trying to upload files to my server. I understand that this is usually caused by running the old version of paperclip before they added support for aws-sdk-v2. It is strange that I am launching the latest version of paperclip (4.3.1), which includes aws-sdk-v2 according to its github page .

Honestly, I'm not sure what else I can say about this. I checked the error log and this is the only complaint. Do I need to do something to start v2 with paperclip? Thanks to everyone who can illuminate this light.

+4
source share
2 answers

Found this out with the help of some people on github. (see section here.)

It seems that clip 4.3.1 does not yet fully support v2. A week after he was released or so, the command was transferred to the master, who passed this error. It doesn't seem to be perfect, but here's how I did it.

You can specify this specific revision of paperclip for bundler with the following line:

gem 'paperclip', :git=> 'https://github.com/thoughtbot/paperclip', :ref => '523bd46c768226893f23889079a7aa9c73b57d68'

More information on this can be found here.

You will need to specify your REGION in your default paperclip default. This can be done by dropping :s3_region=> 'us-west-2'(or any other region) into yours paperclip_defaults. It is not enough to simply specify the endpoint or host. You can look here .

, :

; : ENV ['AWS_REGION']

  • .
  • :region , :s3_region
+3

Source: https://habr.com/ru/post/1610904/


All Articles