Welcome to Giant Robots Smashing Into Other Giant Robots — a weblog about development, business, design and technology — written by thoughtbot.

SwitchTower Gotchas

If you’re using SwitchTower to deploy your rails apps (it’s fun!), you might run into these errors:

  • A Net::SSH authorization issue
  • Problems running the reaper, spinner or spawner scripts

The problems causing these errors are:

  • A host you are trying to deploy to is prompting you to confirm it’s ssh identify because you haven’t yet (and switchtower is choking on this)
  • The PATH of the user you are deploying as on a remote server doesn’t have ruby in it’s path.

You can correct these problems by:

  • Connect via SSH once manually to each server you are deploying to—which will add the remote host to your local list of allowed hosts, removing the prompting that breaks ST.
  • Change the first line in each of the script/process scripts to be the direct path to ruby on the deployment servers. Alternately, you could add the path to ruby to the user’s environment PATH on the remote server—but I think putting it directly in the script/process files is better since cron jobs don’t have PATH info and you could conceivably run those (especially the spinner) from a cron task.

Enjoy your deploying!


About this entry

 

thoughtbot is hiring

We are hiring web developers and web designers in both Boston and New York, NY.

What are we up to?

We built Shoulda, an eclectic set of additions to Test::Unit; Paperclip to manage uploaded files without hassle; Jester, a REST/ActiveResource client library written in Javascript, and Squirrel, an enhancement for ActiveRecord's find syntax; — amongst some other projects.


Chad (President) and Jon (CTO) co-authored a technical book titled Pro Active Record: Databases with Ruby and Rails, which explores the ins and outs of the ActiveRecord ruby library. You can buy it today at Amazon.com.

About thoughtbot, inc.

We are a small web application development consulting business, with offices in Boston, MA and New York, NY. If you're looking to find a team for your next web development project or your new web application — get in touch.