post

Lunch with Jamis Buck

Today I had the great pleasure of having lunch with Jamis Buck of 37signals. While visiting family in Nampa, ID I realized that Jamis lived nearby. We met at Mancino’s Pizza where Jamis said his wife used to go in high school.

We talked ruby, rails and family over the best Philly Steak and Cheese sandwich I’ve ever had. Living in Manti makes it hard to visit with other rubyists so it was really nice to sit down and talk about some of the cool things in edge rails. Of course, my wife is always willing to listen but it’s hard to really engage her in a conversation about ruby. ;)

post

Capistrano 2.almost

On Wednesday Jamis Buck released a preview of the upcoming Capistrano 2.0. For those not familiar with Capistrano yet, it is a framework for automating tasks via SSH on remote servers. Use it for everything from software installation and application deployment to configuration management and ad hoc server monitoring. It is a fantastic piece Ruby workmanship and the single most useful Ruby utility in my toolbox.

There are a few gotchas if you’re upgrading from 1.x which Jamis outlines at the new home of Capistrano, capify.org. Nothing in the list is a deal breaker. After reading through the new feature set it’s clear that Jamis has been working hard to make Capistrano operate with fewer assumptions about what you’re trying to do with it.

Capistrano (born Switchtower) was created with the specific intention of relieving the pain 37signals felt when deploying their Rails based products. Thus it made several assumptions that, by default, anticipated a Rails setup. No longer. Instead of looking for a deployment recipe (config/deploy.rb),

“Capistrano 2.0 will now look for the capfile first in the current working directory, and if it does not locate it there, it will continue to search up the directory tree until it either reaches the root directory, or finds a Capfile. This means you can now invoke cap from anywhere within your project tree, and have it find your project Capfile.”

I still sit there staring at the terminal with a huge grin on my face each time I run ‘cap deploy’. Take it to the next level and get Capistrano 2.0 Preview 1 with:

gem install -s http://gems.rubyonrails.com capistrano

Jamis is soliciting feedback on Capistrano 2.0 in the Capistrano mailing list.

post

Separate passwords for svn/ssh via Capistrano

Jamis Buck has a very helpful post about getting <strike>SwitchTower</strike> Capistrano to play nicely when the SSH and SVN logins don’t match.

However, in one project I am working on, I had to modify this code just a little. The SVN checkout was complaining that the repository didn’t exist when I ran “rake deploy”. After some testing, I found that it was jailshell that was spitting out the error.

The app is being deployed to a site5 shared hosting and the SVN repo is hosted on TextDrive. On a hunch I added explicit quotes around the username and password in the SVN checkout line. Suddenly the entire deploy worked like a charm!


set :svn_password,
Proc.new { Capistrano::CLI.password_prompt('SVN Password: ') }
set :repository,
Proc.new { "--username \\"#{svn_user}\\" " +
"--password \\"#{svn_password}\\" " +
"http://svn.domain.com/#{application}/trunk/" }

post

Ruby on Rails 1.0 is out!

Haven’t you heard? Rails 1.0 is out.