A Mac OS X Snow Leopard upgrade can go badly for Rails developers.
Norbauer provides some advise on fixing mySQL and other elements of the Ruby on Rails development environment that can break when upgrading to the 64-bit Snow Leopard environment. For a full description, see http://norbauer.com/notebooks/code/notes/snow-leopard-upgrading-for-rails-developers.
We have a large number of iMac OS X system on which we develop Ruby applications and were thankful this upgrade advise. Unfortunately, it did not alway address our problems. In those case, we actually found a fresh install was the most effective solution. Developers in the same situation may find the following directions for doing this helpful.
Duc and I tried to upgrade to Snow Leopard and to our surprise, it did not go very well. As a last resort, we had to make a fresh install of the OS. One shouldn't have to do this, but in case somebody needs to, here are the steps that I noted down:
--- Restart the machine with the the OS DVD, before you start the installation, click on Tools-> Disk Utility, Erase the hard drive. (If you don't do this step, you have have an upgrade system) Then go back to the installation process.Here are some quick notes to set up development environment:--- Install Xcode package from the DVD--- Install 64 BIT Mac version of mysql package from mysql.com--- Set sticky bit for /private/tmp/ (Prevent normal user to detele the /tmp/ folder which contains the mysql.sock)chmod +t /tmp--- Add path to mysql folder:Put this into ~/.bash_profilePATH=$PATH:/usr/local/mysql/bin --- Check mysql socket location:mysql_config --socket--- Fix mysql.sock for PHP:sudo mkdir /var/mysqlsudo ln -s /tmp/mysql.sock /var/mysql/mysql.sockTest mysql.sock:mysqladmin --socket=/path_to_socket_file/ version--- Installing Ruby:Xcode come with some basic gems and you cannot remove these gems. Of course you can upgrade to newest versions.sudo gem update --systemsudo gem install railssudo gem update rakesudo gem update sqlite3-rubyBecause SL is a 64 bit, you have to install mysql gem for 64 bit architecturesudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config This should get you ready for PHP / RoR / Mysql dev.Cheers,
Tri