Tuesday, 21 May 2013

Installing Ruby 2.0.0 on an Amazon Linux AMI

Earlier we already explained how to get Ruby 1.9.3 running on an Amazon AMI.  This is just a quick update to get version 2.0.0 up. We used the current 64 bits Amazon AMI (2013.03.1).
Note that the complete procedure might take a few hours on a Amazon Micro instance. Deleting the old version of Ruby also removes the package aws-amitools-ec2. As long as you don’t need to create your own AMIs with this instance, you will be fine.
Here is the procedure, as usual log in as ec2-user and perform the following from the shell:
sudo su -
cd
yum remove ruby
yum groupinstall 'Development Tools'
yum groupinstall development-libs
yum install libffi-devel
yum install libyaml-devel
yum update
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.gz
tar xzvf ruby-2.0.0-p195.tar.gz
cd ruby-2.0.0-p195
./configure
make
make install
make clean
gem update –system
exit
ruby --version (this should give you the newly installed version)

I did not get any errors related to Doxygen this time (the dreaded "make: *** [doc/capi/.timestamp] Killed"). If you do, please refer to our earlier post on how to fix this by installing the latest version of Doxygen from source.

That’s it! Have fun with Ruby!

History

2013/05/21 Initial version.

3 comments:

  1. Awesome. Thanks a lot for detailed instructions!

    ReplyDelete
  2. Minor edit from above: It's gem update --system (there are two dashes before system)

    ReplyDelete