문제

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.

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top