SwitchTower on OSX

Posted by Jamis on September 24, 2005 @ 07:40 AM

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).

Posted in Tips & Tricks

Comments

Have something to add? Click here to leave a comment.

24 Sep 2005

1. Alan Francis said...

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.
27 Sep 2005

2. Alan Francis said...

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

3. Alan Francis said...

oops. 2nd comment posted on wrong entry. Doh!
29 Sep 2005

4. mikkel said...

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
30 Sep 2005

5. Jamis said...

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.
25 Oct 2005

6. Manfred said...

Why ohhh why did Apple screw the Ruby install up so much.
28 Oct 2005

7. Gabe da Silveira said...

I think this stuff should go in the manual in a troubleshooting section or something, I had to google to find this.
22 Feb 2006

8. Alison said...

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.

9. Jamis said...

Alison, you may be running into a problem with your path. What does typing @which ruby@ 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.

10. Alison said...

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.
: (leave url/email »)
: