Updating Ruby & Rails on OS X


The 10.4.9 version of OS X includes ruby 1.8.1-1, and readline 5.0. The latest version of ruby is 1.8.6. You can follow the excellent instructions on maconrails.com I had to make a few minor adjustments to get it to work on my system.

  1. Install xcode for C development. At least you’ll need to install these packages: gcc4.0.pkg, DevSDK.pkg, BSDSDK.pkg, and X11SDK.pkg
  2. The readline that is included in OS X is recent enough.
  3. Create .bash_profile file and modify the PATH environment variable.

    export
    PATH="/usr/local/bin:/usr/local/mysql/bin:/usr/local/sbin:$PATH"
  4. Get the latest version of Ruby and Gem. Copy their folders into /usr/local/src. Now build & install it on your system:

    $ cd /usr/local/src/ruby-1.8.6
    $ source ~/.bash_profile
    $ ./configure --prefix=/usr/local --enable-pthread
    $ make
    $ sudo make install
    $ sudo make install-doc
    $ cd ../rubygems-0.9.4
    $ sudo ruby setup.rb
    $ sudo gem update --system
    $ sudo gem install rails --include-dependencies

2 Responses to “Updating Ruby & Rails on OS X”

  1. Tobias Hoellrich Says:

    I just did the same using MacPorts via:


    $ sudo port -d -v install ruby rb-rails

  2. sj Says:

    You’ve convinced me to try MacPorts
    I tried macports to install ruby & rails. But looks like you’ll need to install/update rails using gem. Where you able to install/upgrade to rails version 1.2.3 with macports?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.