Monthly Archives: December 2012

bundle “reinstall”

After an OS upgrade you may find several gems broken, usually gems that rely OS dependent components(libraries, etc..)

If you’re using rvm/gemsets and bundler it’s pretty simple to reinstall all gems with their native extensions:

rvm gemset empty gemset-name
bundle install

If bundle install does not work – you may need to install bundler first:

gem i bundler

romanian translation for spree_i18n

Are you using spreecommerce?

We too 🙂

We just completed a romanian translation for spree, it’s available in the “official” spree_i18n-gem.
Take a look at our translation we just commited:
https://github.com/spree/spree_i18n/commit/9467f8fb00454bd56b7941ded443e937583689fa

To use it in your rails app, simply:
1. Add the following to your Gemfile
gem 'spree_i18n', :git => 'git://github.com/spree/spree_i18n.git'

2. Insert the following line in you config/application.rb

module Spreee
class Application < Rails::Application ... config.i18n.default_locale = :ro end end

3. bundle install - și gata 🙂

SSL certs from STARTSSL – for nginx

Follow all necessary stept until Startssl gives you the ssl.key

openssl rsa -in ssl.key -out ssl.key

Follow further stepts until Startssl gives you the ssl.crt
Download StartSSL’s root CA and class 1 intermediate server CA certificates:
http://www.startssl.com/certs/ca.pem
http://www.startssl.com/certs/sub.class1.server.ca.pem

Now create a unified certificate:

cat ssl.crt sub.class1.server.ca.pem ca.pem > ssl-unified.crt

Upload the files ssl.key and ssl-unified.crt to the server
Do not forget to chmod 600 ssl.key
In your nginx ssl vhost include:

ssl on;
ssl_certificate /path/to/ssl-unified.crt;
ssl_certificate_key /path/to/ssl.key;