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