The maze book for programmers!
mazesforprogrammers.com

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

SwitchTower on OSX

24 September 2005 — 1-minute read

Some people have been reporting some problems running SwitchTower on the Mac. The problem lies with the fact that, once again, Apple seems to have messed something up with their default install of Ruby.

If you encounter problems with SwitchTower hanging on the Mac, please try installing Ruby either manually, or using one of the port systems for OSX (darwinports or fink).

Note that if you do reinstall Ruby this way, you’ll need to do a few things afterwards:

  1. backup and then delete the ruby, irb, and ri in /usr/bin.
  2. reinstall any extension libs and gems (like SwitchTower and its dependencies, Net::SSH and Needle).

Reader Comments

Seems to be an OpenSSL issue. I installed via DarwinPorts, messed with symlinks and paths, reinstalled rubygems + all the gems.....and then saw Why's post about Ruby 1.8.3 being available. Doh! I promptly installed again from source, messed with symlinks and paths, reinstalled rubygems + all the gems :-) Both the ports and source installs fixed the switchtower problem. FWIW, it used to work. I *have* deployed via Switchtower from my PB using the default ruby install. I can only assume some update in the past while has broken it.
Hi Jamis, Could you give us a 5 minute tutorial on using the migration from the get-go ? I've just started a project and have my schema in a .sql file which I load with my own little populate_database script. Before I go any further, I'd rather switch and use the ActiveRecord stuff. So assuming I'm starting a brand new project, I do 'rails myproject'. At the moment I start editing my .sql file...what should I do instead ? Alan
oops. 2nd comment posted on wrong entry. Doh!
is this the error you talk about or is my install extra messed up: ruby(2233) malloc: *** vm_allocate(size=1409417216) failed (error code=3) ruby(2233) malloc: *** error: can't allocate region ruby(2233) malloc: *** set a breakpoint in szone_error to debug [update_code] transaction: rollback
mikkel, that's one of the errors. There's that one, and there's one where it will just hang without responding. In general, if you have a problem with SwitchTower (or Net::SSH in general) on Mac OS, just reinstall Ruby.
Why ohhh why did Apple screw the Ruby install up so much.
I think this stuff should go in the manual in a troubleshooting section or something, I had to google to find this.
Any reason I should have to do this if I'm running Switchtower through a Locomotive-launched terminal? I'm experiencing errors similar to these, but I thought it would be using Locomotive's Ruby.
Alison, you may be running into a problem with your path. What does typing @which [email protected] into your console say? Also, which does @ruby -e 'p $LOAD_PATH.first'@ say? Those may give some clue as to whether the console is being launched using locomotive's ruby, or the stock OSX ruby.
I ran those commands and saw that indeed it was Locomotive's ruby which was being used. So, I investigated further to find that my SVN server's setup was the culprit. Switchtower and Shovel are now working beautifully. Thanks for your help and a great application.