Thursday, June 24, 2010

Installing Ruby 1.9.2 on Snow Leopard

1)

Install Readline:

curl -O ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
tar -xvzf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make
sudo make install

I ignored the message: install: you may need to run ldconfig

2)

Install Ruby 1.9.2

curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-rc1.tar.gz
tar -xvzf ruby-1.9.2-rc1.tar.gz
cd ruby-1.9.2-rc1
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
make
sudo make install
sudo make install-doc


I ignored the message: configure: WARNING: unrecognized options: --with-readline-dir

3) Update ~/.bash_profile with
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

in the last line

Open a new window and check Ruby version: ruby -v
ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-darwin10.4.0]