[Hint] Deploying Ruby on Rails applications on Dreamhost with Capistrano

So, you have a nifty Ruby on Rails application, got yourself a cheap Dreamhost account and you want to give Capistrano a try. And what do you get - errors.

This occurs if you have Ruby gems installed in your home directory (probably ~/.gems/). I’m assuming that you already have your environment configured. Despite that you still can get errors like no file to load -- json when executing cap deploy. That’s because you have your shell configured, but most likely non-interactive environment is left intact.

To fix this you have to modify your .bashrc file (since you probably added GEM_HOME and GEM_PATH to .bash_profile):

export GEM_HOME=$HOME/.gems 
export GEM_PATH=$GEM_HOME:/usr/lib/ruby/gems/1.8

And you’re probably done.

You can also check these articles, they’ve been very helpful:
Deploying Rails (2.0) to Mongrel with Capistrano 2.1
Using Capistrano with Rails
Ruby on Rails - Dreamhost

0 Responses to “[Hint] Deploying Ruby on Rails applications on Dreamhost with Capistrano”


  1. No Comments

Leave a Reply