Building Ruby and Rails On OS X.

Hivelogic has a tutorial for building Ruby and Rails on OS X. This is nice since Apple includes some outdated software with version 10.4 of their OS. What I’ve noticed here as well as many other tutorials explaining advanced subjects is a distracting caution about how terribly dangerous their instructions are. Coming from GNU/Linux, I think this is glib. So in an effort to promote more concise tutorials here’s the same tutorial with the precautions removed. It’s expected you know what you’re doing if you follow this.

  1. Download and install MySQL 5.0 binary for OS X
  2. Download and install MySQL GUI tools for OS X
  3. Edit your $PATH variable
    export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
  4. Download the Ruby source code
  5. Compile it with these configure options
    ./configure --prefix=/usr/local --enable-pthread --enable-shared
  6. Download and install Ruby Gems
    sudo /usr/local/bin/ruby setup.rb
  7. Install Rails via Gem
    sudo gem install rails --include-dependencies

The rest is included in the Rails documentation and shouldn’t require any more explanation. So that’s 7 steps, assuming that you know what Terminal.app is.

Leave a Reply

You must be logged in to post a comment.