2008-10-15

Merb, passenger and dreamhost

I've confirmed that Merb apps will run under Phusion Passenger at Dreamhost. I used a modified version of the setup described at PunNeng.com. I basically used merb 0.9.9 (1.0 RC1) and bundled (thor merb:dependencies:install stable --include-dependencies) the gems up. I then pushed this to my git repository (also on dreamhost) and used this as the source to deploy the app from. I created a config.ru in the app root with ENV['GEM_PATH'] = '/home/your_home/app.domain.com/gems/' in it. I thought bundling was neater than installing the gems on dreamhost myself.

I did have a couple of problems. For starters do_mysql isn't installed with the bundling process of merb at the moment. I had to add export GEM_PATH='/home/your_home/app.domain.com/gems/' to my .bash_profile and then run gem install do_mysql.

I also had an issue with the passenger fighting with fastcgi. I'd overlooked deleting the .htaccess file within the public directory of the app. Once that was deleted passenger started serving the app without problem.

So it's rock on with Dreamhost (get $50 off with code MERBITUP), they are currently offering unlimited bandwidth and disk space (plus a 50Gb personal backup store).

2 comments:

Daniel Kehoe said...

I've written a wiki entry for the DreamHost support wiki that gives detailed updated instructions for Installing Merb 1.0 at DreamHost.

Tim said...

Daniel,

Great write-up. It would have really helped me out a few weeks ago. Unfortunately I'm still stuck on an old ruby version, despite the upgrade to unlimited hosting. Support couldn't give me a time frame for the upgrade unfortunately. Not an issue at the moment, although I have updated my app and want to re-deploy it at some point.

Cheers,

Tim.