rvm `require': no such file to load -- rubygems (LoadError)
- by xxd
run a ruby code got error "rvm `require': no such file to load -- rubygems (LoadError)"
bash-3.2$ rvm --default ruby-2.0.0-p451
-bash-3.2$ rvm list
rvm rubies
=* ruby-2.0.0-p451 [ x86_64 ]
-bash-3.2$ gem list --local
*** LOCAL GEMS ***
bigdecimal (1.2.0)
bundler (1.5.3)
bundler-unload (1.0.2)
executable-hooks (1.3.1)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
net-ssh (2.9.1)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.4.2)
rvm (1.11.3.9)
test-unit (2.0.0.0)
-bash-3.2$ gem list --local rubygems
*** LOCAL GEMS ***
rubygems-bundler (1.4.2)
to run the script:
ruby test.rb
`require': no such file to load -- rubygems (LoadError)
$ cat test.rb
require 'rubygems'
require 'net/ssh'
Net::SSH.start(.............
what's going on? please advice. thanks