我以通常的方式安装了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'"消息是可疑的....
,当我致电gem list
时,列表为空。
*** LOCAL GEMS ***
,但然后我致电rvm use ruby@global
,然后致电gem list
,我得到:
*** LOCAL GEMS ***
bundler (1.2.1)
rake (0.9.2.2)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
因此,显然,从"默认"宝石中看不到我的"全局"宝石。你能告诉我为什么吗?
这是"全局"宝石的rvm info
的输出:
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: ""
我认为我遇到了同一确切的问题,除了mac osx 10.7。
我是Ruby的新手。我正在通过Netuts教程(http://net.tutsplus.com/tutorials/ruby/singing-with-sinatra-the-recall-app-2/)。
我安装了RVM,升级到最新的Ruby(Mac带有1.8.7),设置RVM默认为1.9.3,已安装的Sinatra,DatamApper等irb或一个.rb文件,我得到" LoadError:无法加载此类文件-DatamApper"错误。
i GEM已安装了Data_mapper,这似乎有效,但是,这似乎是我不理解的某种配置问题。
我发布的是因为我看到与您的RVM(1.16.17)和Ruby(1.9.3-P286)的版本相同的版本,并且我在我的GEM列表中具有相同的RVM版本-Local-local(RVM 1.11.3.5)(RVM 1.11.3.5)。
不确定我如何拥有RVM 1.16.17,并且宝石说RVM 1.11.3.5。另外,RubyGems应该被"包含在1.9中",但是在IRB中,如果我键入需要" RubyGems",则返回false。
我讨厌成为n00b ...对不起,我没有答案。
您是否首先使用了Ruby:
rvm use ruby