Tips for a clean GeneValidator installation

The aim of this post is to state the possible challenges that one can face when installing GeneValidator. In the following I will describe the steps I did for setting up GeneValidator on a clean installation of Ubuntu 14.04.

Install GeneValidator with sudo privilege

First thing to do is to install Ruby (>= 1.9.3) and Ruby-dev (>=1.9.1). Note that older versions of ruby and ruby-dev lead to incompatibility issues with some of the ruby gems that GeneValidator uses. 

$ sudo apt-get install ruby1.9.3
$ sudo apt-get install ruby1.9.1-dev


Other packages you need are:
  • Git (to download the source code from GitHub):
$ sudo apt-get install git

  • Make (to execute shell commands files)
$ sudo apt-get install make

  • Rake (Make-like program implemented in Ruby):
$ sudo apt-get install rake


Then, make sure you get the last version of GeneValidator :

$ git clone git://github.com/monicadragan/GeneValidator.git

Build the ruby gem (the command below installs all the dependencies as well):

$ sudo rake

And that's it!

If you use a previous installation of Ruby you might face compatibility problems when GeneValidator tries to install a gem called Nokogiri (used for parsing the input files). Nokogiri requires the following packages which need to be manually installed if missing: libxml2-dev libxslt1-dev

$ sudo aptitude install libxml2-dev libxslt1-dev
$ sudo aptitude build-dep libxml2


Additionally, be careful about the following Nokogiri error message: "libxml2-2.9.0 and higher are currently known to be broken and thus not supported by nokogiri due to compatibility problems and XPath optimization bugs". If you get this message you might need to install libxml2-2.8 from the sources.  

Install GeneValidator in your own directory (no sudo privilege required)

You can easily install GeneValidator locally following the instructions below (inspired from this great post). But first make sure that the following packages are installed on your system: ruby (>=1.9.3), ruby-dev(>=1.9.1), git, rake, make.

In the following commands replace /var/lib/gems/1.9.1 with the path of your own ruby gem installation directory. You can find it by running:

$ gem environment

Create a local directory for gem installation:

$ mkdir ~/.gems

Set up your .gemrc for gem install-time configuration:

$ cat << EOF > ~/.gemrc
gemhome: $HOME/gems
gempath:
- $HOME/gems
- /var/lib/gems/1.9.1
EOF


Set up some environment variables for run-time:

$ cat << EOF >> ~/.bashrc
export GEM_HOME=$HOME/gems
export GEM_PATH=$HOME/gems:/var/lib/gems/1.9.1
export PATH=$PATH:$HOME/gems/bin
EOF


And now (again) the actual installation of GeneValidator:

$ git clone git://github.com/monicadragan/GeneValidator.git
$ rake


And now you are done :).



0 comments:

Post a Comment