Tag Archives: dreamhost

Deploying your Rails 3 app on Dreamhost

This is another quick post: to deploy your Rails 3 app on a shared hosting at Dreamhost, just use RVM to make sure your gems will have their place in the sun on the user’s directory (otherwise Passenger will throw an access denied to /root/.gems error) and then configure your Rails app for the new gems path. Here is the step-by-step:

1) Access your Dreamhost account via SSH.
2) Install RVM “as a user” (you won’t be able to try this as root). Here is the step-by-step).
3) Configure your app so Passenger will know where to find your gems, including these lines in config.ru at the beginning of the file:

ENV['GEM_HOME'] = '/path/to/your/gems'
require 'rubygems'
Gem.clear_paths

Where ‘/path/to/your/gems’ should be replaced by your GEM_HOME using RVM. Lets say you installed ruby 1.8.7 (using rvm install 1.8.7) and a gemset named mygemset, the path to your gems may look something like: /home/USER/.rvm/gems/ruby-1.8.7-p330@mygemset

Edit @ mar 6th, 2011: Yesterday, Dreamhost announced they already support Rails 3, and its current version at the time of this writing is 3.0.3

Installing your Rails/RestfulX app (and its gems) at Dreamhost

Although I heard a lot of bad comments about Dreamhost, I cannot complain: in one year of hosting I had no problems.

Some days ago I published a tiny Flex/Rails/RestfulX app and it was straightforward. I had minor problems understanding how the user could install their gems, but it is really simple.

First create a subdomain with Passenger support. You’ll need to inform a web directory ending with “/public/”, as this screenshot shows:


Leia o restante do artigo