Question

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 correct solution

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top