SSL Error When installing rubygems, Unable to pull data from ‘https://rubygems.org/

For RVM & OSX users Make sure you use latest rvm: rvm get stable Then you can do two things: Update certificates: rvm osx-ssl-certs update all Update rubygems: rvm rubygems latest For non RVM users Find path for certificate: cert_file=$(ruby -ropenssl -e ‘puts OpenSSL::X509::DEFAULT_CERT_FILE’) Generate certificate: security find-certificate -a -p /Library/Keychains/System.keychain > “$cert_file” security find-certificate … Read more

rails 3.1.0 ActionView::Template::Error (application.css isn’t precompiled)

By default Rails assumes that you have your files precompiled in the production environment, if you want use live compiling (compile your assets during runtime) in production you must set the config.assets.compile to true. # config/environments/production.rb … config.assets.compile = true … You can use this option to fallback to Sprockets when you are using precompiled … Read more

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

I ran into a similar problem when trying to use the JQuery generator for Rails 3 I solved it like this: Get the CURL Certificate Authority (CA) bundle. You can do this with: sudo port install curl-ca-bundle [if you are using MacPorts] or just pull it down directly wget http://curl.haxx.se/ca/cacert.pem Execute the ruby code that … Read more

Run a single migration file

Assuming fairly recent version of Rails you can always run: rake db:migrate:up VERSION=20090408054532 Where version is the timestamp in the filename of the migration. Edit: At some point over the last 8 years (I’m not sure what version) Rails added checks that prevent this from running if it has already been run. This is indicated … Read more