Sunday, October 28, 2007

Tip: Leopard and Legacy Rails

Due to the size and requirements of our enterprise healthcare application that we've written on Rails, we've been sort of stuck at rails 1.1.6 and ruby 1.8.5. Not that we don't want to upgrade, but in trying to build on functionality so we can make enough sales to sustain ourselves, we've had to forgo tracking down all the problems that keep us from going to rails 1.2.3 and ruby 1.8.6

As a good Mac geek, I upgraded my computer to Mac OS X 10.5 Leopard this weekend, deciding to use the archive & install feature because I had some issues upgrading from 10.3 to 10.4. (my compilation of ruby 1.8.4 would crash randomly). Of course, Leopard, being all cool and stuff, ships with rails 1.2.3 and ruby 1.8.6.

Fortunately, compiling ruby 1.8.5 was straight forward (just don't use the --enable-pthread option or you'll get a crash!), and otherwise the instructions to install gems, postgres, and RMagick all worked exactly the same as on Leopard.

And since Apple manages the ruby/rails installation that ships with Leopard via a Ruby framework and some symbolic links in /usr, it means that if you compile and install everything into /usr/local, you can easily revert back to Leopard's ruby/rails whenever you want.

So the net result: If you have a legacy app, just compile and install and you are good to go.

Speaking of, I really should make a set of blog articles that goes over the compile/install procedures for ruby, rails, postgres, and RMagick, on Leopard. But right now I'm having too much fun playing with Time Machine to care. :)

Edit (10/28/07): As noted in this article, rails 1.8.5 p114 has a bug in it. However it appears that p52 works just fine.

No comments: