Peter Marklund

Peter Marklund's Home

Fri Aug 31 2007 03:50:04 GMT+0000 (Coordinated Universal Time)

Rails Deployment: Rapid Setup with the Machinify Gem

I used the Machinify Gem by Bradley Taylor (Mr RailsMachine) the other day to install a Rails stack on a piece of Ubuntu 7 Xen VPS and I must say it worked really nicely. The Gem uses rake to install the common stack of MySQL 5, Apache 2 with mod proxy load balancer, Mongrel Cluster, and Mongrel. The gem also takes care of installing all the obscure Debian packages needed that you don't even want to know about.

There is a small glitch currently in the Machinify gem in that the Mongrel Cluster version is hardcoded in its mongrel.rake file. Once I corrected that and ran rake stack:install again it worked like a charm. Related to this issue, I was trying to find out how to fetch the current version of a Gem and the best I could come up with was:

# On the command line:
gemwhich capistrano
=> /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano.rb

# In Ruby:
`gemwhich capistrano`[%r{-([0-9.]+)/lib/[^/]+$}, 1]
=> "2.0.0"

If you are on Cent OS you should check out RubyWorks by ThoughtWorks (the installer, not the singer).