我用RVM安裝Ruby 1.9.2成功:安裝了RVM紅寶石,但不能運行的.rb文件
# rvm list
rvm rubies
ruby-1.9.2-p290 [ i386 ]
# ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
但我試圖運行一個簡單的Ruby腳本
Tue Aug 09 10:57:15 [root]# echo "puts \"hello\"" > test.rb
Tue Aug 09 10:57:25 [root]# ruby test.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- bundler/setup (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
有誰知道發生了什麼事?以下是rvm信息的輸出:
# rvm info
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- bundler/setup (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
system:
system:
uname: "Linux egkrateia 2.6.39.1-linode34 #1 SMP Tue Jun 21 10:29:24 EDT 2011 i686 i686 i386 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.2.8(1)-release (i686-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.6.32 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/local/rvm/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/local/rvm/bin/gem"
rake: "/usr/local/rvm/bin/rake"
environment:
PATH: ":/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/Users/jku/Documents/android-sdk-mac_x86/tools:/Users/jku/Documents/android-sdk-mac_x86/platform-tools:/usr/local/rvm:/usr/local/rvm/bin:/usr/local/rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: "-I/Users/jku/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.15/lib -rbundler/setup"
gemset: ""
我的答案是否解決了您的問題? – Serabe