Massiv ups for Phusion Passenger
I hadn’t worked with a Rails application server since back when Mongrel was the cool thing. Boy, is Phusion Passenger (mod_rails) a wonderful surprise! It is exceedingly rare to see software have such clearly presented installation and support documentation. The installer executable is non-confusingly verbose, telling you what it’s checking for and precisely what to do to fix what’s broken. Bravo, Hongli Lai and Ninh Bui.
Their site design is nifty-looking, too.
Capistrano and its gotchas
I did my first successful Capistrano deployment last night. The rubyonrails manual is pretty nice, though it is a bit out of date, and uses rake migrations, which are now deprecated in Capistrano. What really was a tremendous help for me was Coda Hale’s article *Time For A Grown-Up Server: Rails, Mongrel, Apache, Capistrano and You*, which not only convinced me of the superiority of a Mongrel cluster proxied via Apache’s mod\_proxy\_balancer to anything using FastCGI, but which also provided a fantastically useful walkthrough.
I was flummoxed for a bit by my failed deployment, when it turned out that all I had wrong was that the :repository variable in config/deploy.rb was set to something slightly wrong, so the remote Subversion client was unable to check out the code. And I even thought that I saw the activity appearing correctly in the Subversion server’s Apache logs. Once that was fixed, “cap cold_deploy” worked like a charm. The error was a bit inscrutable (to me) for a while. See the dumb syntax error? My “prj” abbreviation for “project” was what killed me. (That’s not the real project name; I have anonymized the thingy.)
my-host:~/project max$ cap cold_deploy
* executing task cold_deploy
* executing task update
** transaction: start
* executing task update_code
* querying latest revision…
svn: REPORT request failed on ‘/repos/!svn/bc/40/prj/trunk’
svn: ‘/repos/!svn/bc/40/prj/trunk’ path not found
*** [update_code] transaction: rollback
* [update_code] rolling back
* executing “rm -rf /u/apps/project/releases/20070601032656″
servers: [”www.project.com”]
Password:
[www.project.com] executing command
command finished
/usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:24:in `latest_revision’: Could not determine latest revision (RuntimeError)
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:62:in `initialize’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `call’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `[]’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:236:in `method_missing’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:63:in `checkout’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:80:in `load’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `update_code’
… 13 levels…
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:12:in `execute!’
from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap:11
from /usr/local/bin/cap:16:in `load’
from /usr/local/bin/cap:16
Look out: Capistrano 2 is *just* about to come out, and migrating from 1.4 -> 2.0 will be somewhat involved.
I am profoundly disappointed that previous family commitments are going to keep me from attending this month’s Boston Ruby meeting, which includes a presentation by the delightfully acerbic Zed Shaw, the author of Mongrel.
