Question

I try to run a script on a LFS Batchsystem. The cluster offers an older version of ruby, so I had to install my gems and rvm locally on my account. Is there a way to run my local installed ruby version on a batch system? My script works fine on my account but not on LFS because mechanize depends on a newer ruby version.

Was it helpful?

Solution 3

I solved my problem with directly using the binary version and to define my local gem folder:

GEM_HOME=/home/my_name/.rvm/gems/ruby-2.0.0-p195/gems
/home/my_name/.rvm/bin/ruby-2.0.0-p195 my_script.rb

The other solutions do not work, because rvm is not available on the cluster.

OTHER TIPS

Make sure you have rvm then

rvm use 1.9.3

or to set the default:

rvm use --default 1.9.3

And obviously, replace 1.9.3 with the version you want to use

Create .rvmrc file in your working directory in that you would mention which version of ruby you are going to you like:

rvm use 1.9.3@gemsetname --create

Now you can install all gems for this particular gemset.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top