March 18, 2007...1:13 pm

Ruby on Capistrano on Dreamhost on Rails

Jump to Comments

After working for a couple of days on an upcoming web service (more on this shortly), I needed to install it on my Dreamhost account. It was the first time I deployed a Rails app and expected to be somehow painful since I’ve only been using FastCgi and Apache for no longer then a year now.

But googling some random terms I bumped into this page. I’ve red about Capistrano before and decided to fell the pain upfront rather then in the long run.

But first of all, if you’re thinking about doing this, the best place to look is on the Dreamhost’s wiki, that’s all where my problems ended.

Deploying is pretty easy:


gem install capistrano
cap -A .
edit config/deploy.rb (following those instructions)
svn ci
cap setup
cap deploy

So easy that you think to yourself: wont work that was too easy. Well… you’re right.

FastCGI: incomplete headers (35 bytes) received from server

Had this error on my error.log file and knocked my head on the keyboard for almost 2 hours.

Again, Dreamhost wiki to the rescue, I ran rails tmp_app on my DH shell, replace the public directory by the new generated one (rm ~/mydomain.com/current/public; mv tmp_app/public ~/mydomain.com/current) and downloaded the public/dispatch.fcgi and .htaccess to my local app, committed, redeployed and jumped of joy!

But all the pleasure comes from subsequent deployments:

cap deploy

And done!

7 Comments


Leave a Reply