Dreamhost + Merb + Passenger + Rack


First all, I am new to dreamhost, I just bought my 5 year account last night. The main selling point (besides being fairly cheap) was Phusion Passenger.

I have gotten Rails to work with Passenger REALLY easily. But what I really want is to be running Merb on Passenger. (and Dreamhost should too! Its much more efficient!)

I’m not even sure if DH is running the required Passenger version, but if they are, all you really need to do is add this file, called config.ru



require 'rubygems’
require ‘merb-core’

Merb::Config.setup(:merb_root => “.”,
:environment => ENV[‘RACK_ENV’])
Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]

run Merb::Rack::Application.new
[/code]Now passenger actually shows me a “Ruby (Rack) application could not be started” error which makes me think that it does support Rack and Merb, but there is a deeper problem.

From the stack trace it says that " require ‘merb-core’ " has an error, “no such file to load – merb-core”

Now I have my own copy of gems in my own directory and have set my GEM_PATH and GEM_HOME to /home/taelor/gems in my bash_profile. When I run irb and require “rubygems” and then require ‘more-core’ it works fine, returns true.

Any suggestions?

Don’t know whether you fixed this, but try adding:

ENV[‘GEM_PATH’] = ‘/home/taelor/gems/’

at the top of config.ru. That worked for me (with the appropriate path in there), make sure you delete or rename any .htaccess in the public directory of your app as that causes problems (passenger and fastcgi end up fighting).

I’ve successfully installed Merb 1.0 on DreamHost with Passenger.

You can see my installation notes at

I’ve written an entry for the DreamHost support wiki that gives detailed instructions for installing Merb 1.0 at DreamHost:

You’ll like this news then: http://brainspl.at/articles/2008/12/23/merb-is-rails

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost