Pregunta

I'm trying to run the following script from a remote computer on a Linux computer with RVM:

plink.exe -pw root@< Linux ip> /root/script.sh

ERROR: Error installing /usr/local/rvm/gems/ruby-1.9.2-p290/cache/bundler-1.0.22.gem: bundler requires RubyGems version >= 1.3.6

script.sh is a script that runs ruby script.

I think that the problem is caused by some collusion with the RVM or bundler gems on the remote Linux.

Can someone advise?

No hay solución correcta

Otros consejos

You need to make sure that the script you are running is using the correct rvm environment. It might be running under the System ruby. Try running a much simpler script that outputs "ruby ---version" and/or "which ruby" first

Edit:

In your bash script, you might need to do something like:

[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function
rvm use 1.9.2
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top