Ruby is best known as the language behind the rails web application framework. However, it is a very flexible general purpose language that can be used for tasks of direct interest to R Developers (parsing files, interacting with databases, processing XML or JSON, math functions, statistics, machine learning, etc).
If you do not have root access on a Linux server, you may still be able to install the ruby language and rubgems. Start by checking the version currently installed (if any):
Create or navigate to a temporary directory.
Get a source archive of ruby and ruby gems from RubyForge.
Uncompress and extract the downloaded source into such like $HOME/tmp.
tar -xzvf ruby-1.8.6-p110.tar.gz
Change directory to the location of extracted sources.
Run configure script with –prefix option set to $HOME (avoid permissions issues). This will result in an installation of ruby in your home directory.
Add $HOME/bin to your path (in ~/.bash_profile or other startup script).
Verify the correct version was installed:
Keep in mind that various subdirectories will be created by this process (bin, lib, share).
Set GEM_HOME to a gems directory that you have write access to. Replace /home/username with your own home directory location. Use “pwd” to get correct syntax.
Run the ruby gems setup program.
Depending upon your environment, you may want to set up aliases, configure your PATH or other environmental variables.