我安装了Ruby EE作为我的系统范围的Ruby。
我补充说:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
在/ etc / profile。的末尾
if [ -s "/usr/local/rvm/scripts/rvm" ] ; then
. "/usr/local/rvm/scripts/rvm"
fi
然后
rvm install ree
rvm --default ree
我做了我的注销和登录,我能够检查ruby -v
,这是对的,ree是我的默认Ruby。
问题是,我安装了我的宝石,例如gem install bundle
,然后尝试运行bundler并且找不到它。如果我再次运行命令rvm use ree
,那么我就可以运行bundler了。
我的RVM信息:
web:~# rvm info
system:
system:
uname: "Linux web 2.6.18-238.9.1.el5.028stab089.1 #1 SMP Thu Apr 14 14:06:01 MSD 2011 x86_64 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.6.5 by Wayne E. Seguin (wayneeseguin@gmail.com)[https://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/local/rvm/bin/ruby"
irb: "/usr/local/rvm/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/local/rvm/bin:/usr/local/rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
添加了额外的信息
web:~# rvm list
rvm rubies
ree-1.8.7-2011.03 [ x86_64 ]
web:~# id
uid=0(root) gid=0(root) groups=0(root)
web:~# gem list | grep bundle
bundler (1.0.12)
web:~# gem list | grep bundler
bundler (1.0.12)
web:~# bundle
-bash: bundle: command not found
web:~# ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03
web:~#
答案 0 :(得分:2)
原因:我在两个不同的init脚本中有源“/ usr / local / rvm / scripts / rvm”
这个答案帮助我找到了自己的方式Why doesn't "RVM --default" work for me on MacOSX?