Note that there are some explanatory texts on larger screens.

plurals
  1. POFog, Amazon S3 and Carrierwave Rails issue
    text
    copied!<p><strong>UPDATED CONTENT</strong></p> <p>My Setup is now as follows:</p> <pre><code>#Carrierwave Initializer CarrierWave.configure do |config| config.fog_credentials = { :provider =&gt; 'AWS', :aws_access_key_id =&gt; ENV['S3_KEY'], :aws_secret_access_key =&gt; ENV['S3_SECRET'], } config.fog_directory = ENV['S3_BUCKET_NAME'] config.fog_public = false # optional, defaults to true config.fog_attributes = {'Cache-Control'=&gt;'max-age=315576000'} end #Uploader class ProteinUploader &lt; CarrierWave::Uploader::Base include CarrierWave::MiniMagick storage :fog def store_dir "images/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end end #Heroku Config Variables S3_BUCKET_NAME = top5protein S3_KEY = 'xxx' S3_SECRET = 'xxx' #Gemfile ... gem "fog", "~&gt; 1.14.0" gem "excon", "~&gt; 0.25.3" gem 'carrierwave' gem 'activeadmin' ... </code></pre> <p>And the error I am still getting is:</p> <pre><code>Excon::Errors::Forbidden (Expected(200) &lt;=&gt; Actual(403 Forbidden) 2013-07-28T11:51:13.251291+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/excon-0.25.3/lib/excon/connection.rb:260:in `rescue in request' 2013-07-28T11:51:13.251455+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/excon-0.25.3/lib/excon/connection.rb:220:in `request' 2013-07-28T11:51:13.251056+00:00 app[web.1]: FYyKoH99bOV97aK1TQI9dEhIBycFUg2TyP2fYuzY1/Ke+TXevyjKlUA&lt;/HostId&gt;&lt;SignatureProvided&gt;ZuHHwrD3Qdo9IHNhE14eKiB0OgY=&lt;/SignatureProvided&gt;&lt;StringToSign&gt;PUT\n\nimage/png\nSun, 28 Jul 2013 11:51:12 +0000\nx-amz-acl:private\n/top5protein/images/general/image/2/Protein1.png&lt;/StringToSign&gt;&lt;AWSAccessKeyId&gt;AKIAJ5GKDLKK3CPHNTGA&lt;/AWSAccessKeyId&gt;&lt;/Error&gt;", @headers={"x-amz-request-id"=&gt;"04AD4FA1DDE488CE", "x-amz-id-2"=&gt;"SkpxPPpk0FYyKoH99bOV97aK1TQI9dEhIBycFUg2TyP2fYuzY1/Ke+TXevyjKlUA", "Content-Type"=&gt;"application/xml", "Transfer-Encoding"=&gt;"chunked", "Date"=&gt;"Sun, 28 Jul 2013 11:51:12 GMT", "Connection"=&gt;"close", "Server"=&gt;"AmazonS3"}, @status=403, @remote_ip="207.171.163.195"&gt;): </code></pre> <p>and</p> <pre><code>HNTGA&lt;/AWSAccessKeyId&gt;&lt;/Error&gt;", :headers=&gt;{"x-amz-request-id"=&gt;"04AD4FA1DDE488CE", "x-amz-id-2"=&gt;"SkpxPPpk0FYyKoH99bOV97aK1TQI9dEhIBycFUg2TyP2fYuzY1/Ke+TXevyjKlUA", "Content-Type"=&gt;"application/xml", "Transfer-Encoding"=&gt;"chunked", "Date"=&gt;"Sun, 28 Jul 2013 11:51:12 GMT", "Connection"=&gt;"close", "Server"=&gt;"AmazonS3"}, :status=&gt;403, :remote_ip=&gt;"207.171.163.195"}, @body="&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;Error&gt;&lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;&lt;Message&gt;The request signature we calculated does not match the signature you provided. Check your key and signing method.&lt;/Message&gt;&lt;StringToSignBytes&gt;50 55 54 0a 0a 69 6d 61 67 65 2f 70 6e 67 0a 53 75 6e 2c 20 32 38 20 4a 75 6c 20 32 30 31 33 20 31 31 3a 35 31 3a 31 32 20 2b 30 30 30 30 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 70 72 69 76 61 74 65 0a 2f 74 6f 70 35 70 72 6f 74 65 69 6e 2f 69 6d 61 67 65 73 2f 67 65 6e 65 72 61 6c 2f 69 6d 61 67 65 2f 32 2f 50 72 6f 74 65 69 6e 31 2e 70 6e 67&lt;/StringToSignBytes&gt;&lt;RequestId&gt;04AD4FA1DDE488CE&lt;/RequestId&gt;&lt;HostId&gt;SkpxPPpk0 </code></pre> <p>If anyone has any further advice that might help then that would be great!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload