First of all, this may seem backwards, but I set these environment variables first. This is because I messed up the first time I tried to install Ruby, so these were left hanging around.
export RUBYLIB=/opt/ruby/lib:/usr/lib/site_ruby
export PATH=$PATH:/opt/ruby:/opt/ruby/bin
Next I downloaded the Ruby source code:
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.6.tar.gz
I unarchived it:
tar -zxvf ruby-1.8.6.tar.gz
I made a symbolic link which will match the paths in the RUBYLIB and PATH environment variables I set up previously. Also, it's just a lot easier to type /opt/ruby instead of /opt/ruby-1.8.6-p287:
ln -s ruby-1.8.6-p287 ruby
Now, we build and install:
cd ruby
./configure
make
make install
I next installed RubyGems. First we download the archive and unpack:
wget http://rubyforge.org/frs/download.php/43985/rubygems-1.3.0.tgz
tar -zxvf rubygems-1.3.0.tgz
Then we run the setup:
cd rubygems-1.3.0
ruby setup.rb
And that is it!
No comments:
Post a Comment