[BioRuby] Installing Ruby 1.9 on CentOS 5.4

Peter Cock p.j.a.cock at googlemail.com
Fri Nov 4 15:38:45 UTC 2011


Dear all,

I plan to setup one of our servers as a BioRuby buildslave, but it is
running CentOS 5.4 which comes with Ruby 1.8.5, and that is too old
to use for BioRuby. So, I am installing Ruby 1.9 under the home
directory instead, and using that. However, there is a problem with
libyaml that I need help with.

Note that I have a lot of development tools and libraries already
installed (e.g. git), so I'm not mentioning them here - during the
configure step nothing seemed to be missing, lucky for me.

I did apparently need to install libyaml,

$ sudo yum install libyaml
$ sudo yum install libyaml-devel

This gave 0.1.3-1.el5.rf

--------------------------------------------

Step one, download latest stable Ruby 1.9.x and uncompress it,

$ cd ~/Downloads
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
$ tar -zxvf ruby-1.9.3-p0.tar.gz
$ cd ruby-1.9.3-p0

--------------------------------------------

Step two, compile Ruby, test it, install it

Note I tried passing -prefix and --prefix to configure, but it didn't
accept it - use prefix with no minus at all,

$ ./configure prefix=$HOME
$ make
$ make test
$ make install

--------------------------------------------

Step Three, check it

Note I have already configured $HOME/bin to be on my $PATH

$ which ruby
~/bin/ruby
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

$ which gem
~/bin/gem
$ gem --version
/home/buildslave/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
1.8.11

Why isn't Ruby finding libyaml? It is installed at system level via yum.

Thanks,

Peter

--------------------------------------------

I went ahead and tried BioRuby, which told me to install  libxml-ruby
which I did, so I think it is just the libyaml problem to solve....

$ gem install libxml-ruby
/home/buildslave/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Building native extensions.  This could take a while...
Successfully installed libxml-ruby-2.2.2
1 gem installed
Installing ri documentation for libxml-ruby-2.2.2...
Installing RDoc documentation for libxml-ruby-2.2.2...



More information about the BioRuby mailing list