Rails and Leopard: A smooth upgrade

Posted on October 28, 2007

At 26th October, my leopard order arrived, I wrote about it on my other blog. I was testing it for my G5 machine, and it failed to install when I do upgrade of OS from Tiger to Leopard. Finally I found out, its not because of the bug inside the system, but it because of system conflict from some applications installed, so far I gather from some forums, these are the applications affected: ShapeShifter and Application Enhancer, both product from Unsanity. See this forum for more details. Just be prepared to uninstall all the application which you think can affect the default skin of Mac OS X. After that, get ready to back up all your file for pre-caution, so far from my experience, you do not need to do any backup if you do the upgrading of OS from Tiger to Leopard.

I have been thinking twice when I want to upgrade to leopard. Because Apple shipped Leopard with pre installed 29 gems, Ruby 1.8.6 and It run on ZFS or so called 64bits, rather than Tiger 32bits. The implication that may happen, if I do the upgrade, my current configuration and installation which installed with "make install" showed here, I afraid will be broken or overwrite by the default configuration after upgrading Leopard. Next is the Image Magick installation issue which I think will probably have some problems, memory leaked, and incompatibility issue , reason is the 64bits OS. Beside, I have a lot applications installed on my Tiger, and I have projects need to be done, I can't afford spending my time to clean install my Mac to Leopard and re-install all my applications, too much time taken. After a smooth upgrade I done for my fellow friend Hong Kiat, then only I tried out on my mac book.

After the upgrade, there are 2 installations of Ruby on Rails development kits, the first installation is from the carried over from Tiger, and the second one is from Leopard default. So there are 2 locations of Ruby on Rails Installation which is "/usr/local" because all my installation earlier is prefix to that location, and default leopard location can be found on "/usr/bin".

rubify:~ chardy$ which ruby
/usr/local/bin/ruby

rubify:~ chardy$ ruby -v
ruby 1.8.5 (2007-03-13 patchlevel 35) [i686-darwin8.9.1]

rubify:~ chardy$ rails -v
Rails 1.2.5

rubify:~ chardy$ /usr/bin/ruby -v
ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0]

rubify:~ chardy$ /usr/bin/rails -v
Rails 1.2.3

And after the upgrade I found out, all my worry earlier can be easily solved, and I forgotten UNIX system can be set the environment, so I just point all my earlier Tiger environment to Leopard. Just copy modified ~/.profile file like below to point all my installation to /usr/local/bin. I still using ruby 1.8.5 for current development.


PATH="/bin:/sbin:/usr/bin:/usr/sbin"

export PATH="$PATH:$HOME/bin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
export MANPATH="/usr/local/man:$MANPATH"
export PATH="$PATH:/usr/local/mysql/bin"

I have encountered this problem when load the terminal.


perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
     LC_ALL = "En_US",
     LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Then I inputed below to my ~/profile again:


# This setting is for the new UTF-8 terminal support
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

And since I still use macport, I also added export PATH=/opt/local/bin:/opt/local/sbin:$PATH to ~/.profile

So, you can do upgrade to new Leopard operating system without a lot of worry. Just insert the DVD and upgrade. All other installation is taken care. Just restore your existing profile setting. Then roll it out :-) FYI, Leopard comes with both Apache 2.2 and 1.3, default on the Sharing control panel is boot up Apache 2.2. Have fun!

Watch out Hivelogic for his new articles about installation rails on leopard.