Ruby on Rails Development Stack on Mac OS X Leopard
December 1st, 2007
Introduction
The main purpose of this howto is to offer instructions on how to setup a development stack for Mac OS X Leopard. There will be no beefy server backend so the web hosting portion of this tutorial will stop at mongrel. I will be using the built in rails stack and just updating the necessary packages. Now lets get this solid foundation patched and development ready. Enjoy.
Environment
Leopard ships with Ruby 1.8.6 patchlevel 36 with extra goodies that got merged in. The reason why Ruby was not the latest which is available today for download from Ruby-Lang is because it was released after the deadline. Do not fret the security vulnerabilities were patched. Since the version that ships with Leopard is "framework-ized" we will stick with that version and updating the Ruby on Rails installation around it.
Pre-Installed Gems
Below is a list of all the gems that come installed on a default Leopard install. The stack below is before anything has been done to a clean OS X install. We will use this as the base of our stack and build from here.
- actionmailer (1.3.3)
- actionpack (1.13.3)
- actionwebservice (1.2.3)
- activerecord (1.15.3)
- activesupport (1.4.2)
- acts_as_ferret (0.4.1)
- capistrano (2.0.0)
- cgimultiparteof_fix (2.2)
- daemons (1.0.7)
- dnssd (0.6.0)
- fastthread (1.0)
- fcgi (0.8.7)
- ferret (0.11.4)
- gem_plugin (0.2.2)
- highline (1.2.9)
- hpricot (0.6)
- libxml-ruby (0.3.8.4)
- mongrel (1.0.1)
- needle (1.3.0)
- net-sftp (1.1.0)
- net-ssh (1.1.2)
- rails (1.2.3)
- rake (0.7.3)
- RedCloth (3.0.4)
- ruby-openid (1.1.4)
- ruby-yadis (0.3.4)
- rubynode (0.1.3)
- sources (0.0.1)
- sqlite3-ruby (1.2.1)
- termios (0.9.4)
Updating Current Environment
First things first we need to update RubyGems is 0.9.5 which is fully supported by Leopard. To complete this step please run the following command in the terminal.
sudo gem update --system
Once this completes RubyGems will be fully patched and you will be ready to update the Ruby on Rails gems to their latest version.
Upgrading Installed Gems
Now that RubyGems is updated we are ready to update all the installed gems on the system.
sudo gem update
Once that has completed you will not have the latest version of stable rails as well as all the other fabulous gems that ship with Mac OS X.
Testing Your New and Updated Ruby on Rails Stack
cd ~/Sites
rails Test
cd Test
./script/server &
open http://localhost:3000
Adding Support For PostgreSQL Databases
In the next post on this topic I will be going over how to add support for PostgreSQL 8.2.5 as well as compiling PostgreSQL with DTrace support under Mac OS X.
Stay Tuned...
Leave a Reply