Closing the OpenSSL problem
So, you've fixed your initial deploy setup. Not yet a final hurrah?
You're running an ROR-Paperclip-S3 setup. Works fine locally, but not in production. Server boots, pages do load up, but no love for assets?!
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):
You'll be googling around trying to look for the right solution. If you have a domain, just generate the right CSR
, CRT
and KEY
files. However, if your server is self-signed, you'll probably just need the ca-bundle. If you're using capistrano,
cd /your/app/shared/system
wget http://curl.haxx.se/ca/cacert.pem
In your initializer, create a new file named: aws.rb with the following contents:
require 'aws'
AWS.config(
access_key_id: ENV['access_key_id'],
secret_access_key: ENV['secret_access_key'],
bucket: ENV['BUCKET'],
ssl_ca_file: ENV['ssl_ca_file'],
)
Your ENV['ssl_ca_file']
should be pointed to /your/app/shared/system/cacert.pem
. Restart your server, and it should be good to go!