[BioRuby] Installing Ruby 1.9 on CentOS 5.4

Francesco Strozzi francesco.strozzi at gmail.com
Fri Nov 4 15:44:32 UTC 2011


Hi Peter,
first of all huge thanks for the work you guys are doing with the automated
test!

I strongly suggested you to use RVM http://beginrescueend.com/ to compile
and install many different versions of Ruby in the home directory or even
system wide. Also RVM takes care of Ruby compiling from source and if you
have the required libraries it should link them automatically during the
installation process.

Cheers,
Francesco

On Fri, Nov 4, 2011 at 16:38, Peter Cock <p.j.a.cock at googlemail.com> wrote:

> 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...
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
>



-- 

Francesco



More information about the BioRuby mailing list