… of many things …

February 26, 2009

Capinatra deployment

Filed under: Capinatra, Capistrano, Ruby, Sinatra — Tags: — Jason Rogers @ 11:21 pm

Another fine example of using a tool that I didn’t fully understand… not a good idea.

I spent  two days trying to figure out why my Sinatra/Passenger build was not working properly and found out that it was due to one line (19 characters) in my Capfile…

require ‘capinatra’    

It turns out that Capinatra adds an “after hook” to the deployment process of Capistrano that writes the config.ru file to your destination server.  That’s typically OK except that I wanted to tweak my config.ru file.  So, I wrote my own and assumed that would be used during the deploy.  Nope.  Capinatra writes a new one every time based on its config.ru.erb template.  Doh!

So, lesson learned (again, for the umpteen-millionth time) to know your tools.  I wonder how many times I will have to re-learn that lesson.

blog comments powered by Disqus

Powered by WordPress