Saturday, June 6, 2009

irb + rails quickly

irb -r "/config/environment"

Tuesday, June 2, 2009

Install ruby 1.9.1

To install ruby1.9 without impacting your current ruby installation, try the following steps:
1. Compile and Install readline (latest is 6.0) if you don't have already.

curl -O
tar xzvf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make & sudo make install

2. Compile and install ruby 1.9.1.

curl -o ruby-1.9.1-p129.tar.gz
tar xzvf ruby-1.9.1-p129.tar.gz
cd ruby-1.9.1-p129
./configure --program-suffix=19 --enable-shared --with-readline-dir=/usr/local
make & sudo make install

3. Test

> irb19
> ruby19 -v
> gem19 -v