3

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?

Community
  • 1
  • 1
judith
  • 805
  • 2
  • 12
  • 17
  • 1
    I'm not familiar with the SSH client you're using, but what error do you receive? – ezkl May 03 '12 at 09:30
  • 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 – judith May 03 '12 at 13:00
  • 1
    is the script running properly when you run it directly on the target system? – mpapis May 03 '12 at 13:24
  • Use your SSH client to login and update Rubygems by running something along the lines of `gem update --system` then try again. – ezkl May 03 '12 at 13:39
  • Tried that and I got the same error – judith May 03 '12 at 13:55

1 Answers1

1

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
jprabawa
  • 51
  • 4