我以通常的方式安装了 RVM:
curl -L https://get.rvm.io | bash -s stable --ruby
在安装过程中显示了这些消息:
ruby-1.9.3-p286 - #configure
ruby-1.9.3-p286 - #download
(...)
ruby-1.9.3-p286 - #extract
ruby-1.9.3-p286 - #validate
ruby-1.9.3-p286 - #setup
'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)
Saving wrappers to '/home/rmaruszewski/.rvm/bin'.
ruby-1.9.3-p286 - #importing default gemsets (/home/rmaruszewski/.rvm/gemsets/)
Creating alias default for ruby-1.9.3-p286.
Recording alias default for ruby-1.9.3-p286.
Creating default links/files
Saving wrappers to '/home/rmaruszewski/.rvm/bin'.
“'ruby' was not found”消息很可疑......
而且,当我打电话时gem list
,列表是空的。
*** LOCAL GEMS ***
但后来我打电话给rvm use ruby@global
then gem list
,我得到:
*** LOCAL GEMS ***
bundler (1.2.1)
rake (0.9.2.2)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
所以,显然,我的“全局”gemset 在“default”gemset 中是不可见的。你能告诉我为什么吗?
这是rvm info
“全局”gemset 的输出:
ruby-1.9.3-p286@global:
system:
uname: "Linux rmaruszewski 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux"
system: "ubuntu/12.04/x86_64"
bash: "/bin/bash => GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.16.17 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "12 minutes 37 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p286"
date: "2012-10-12"
platform: "x86_64-linux"
patchlevel: "2012-10-12 revision 37165"
full_version: "ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]"
homes:
gem: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global"
ruby: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286"
binaries:
ruby: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin/ruby"
irb: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin/irb"
gem: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin/gem"
rake: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global/bin/rake"
environment:
PATH: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global/bin:/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin:/home/rmaruszewski/.rvm/bin:/home/rmaruszewski/bin:/home/rmaruszewski/bin/build:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt:/opt/AccurevTools/bin:/opt/accurev/bin:/home/rmaruszewski/bin/gitscripts:/srv/git/development/tools/gts/bin:/srv/git/build/Build:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/opt/grails/bin:/opt/gradle/bin"
GEM_HOME: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global"
GEM_PATH: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global"
MY_RUBY_HOME: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286"
IRBRC: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/.irbrc"
RUBYOPT: ""
gemset: "global"
这是针对“默认”宝石集的:
ruby-1.9.3-p286:
system:
uname: "Linux rmaruszewski 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux"
system: "ubuntu/12.04/x86_64"
bash: "/bin/bash => GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.16.17 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "18 minutes 26 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p286"
date: "2012-10-12"
platform: "x86_64-linux"
patchlevel: "2012-10-12 revision 37165"
full_version: "ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]"
homes:
gem: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286"
ruby: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286"
binaries:
ruby: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin/ruby"
irb: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin/irb"
gem: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin/gem"
rake: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global/bin/rake"
environment:
PATH: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286/bin:/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global/bin:/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/bin:/home/rmaruszewski/.rvm/bin:/home/rmaruszewski/bin:/home/rmaruszewski/bin/build:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt:/opt/AccurevTools/bin:/opt/accurev/bin:/home/rmaruszewski/bin/gitscripts:/srv/git/development/tools/gts/bin:/srv/git/build/Build:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/opt/grails/bin:/opt/gradle/bin"
GEM_HOME: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286"
GEM_PATH: "/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286:/home/rmaruszewski/.rvm/gems/ruby-1.9.3-p286@global"
MY_RUBY_HOME: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286"
IRBRC: "/home/rmaruszewski/.rvm/rubies/ruby-1.9.3-p286/.irbrc"
RUBYOPT: ""
gemset: ""