我有点不解决这个问题。我目前正在尝试在共享主机(Site5)上托管Rails3 / Ruby1.9.3应用程序。他们只为Ruby提供1.8.7。所以,我尝试安装RVM,以便我可以使用Ruby 1.9.3。成功安装RVM后,运行'bundle install',我遇到了这个错误:
错误:未安装Gem bundler,请先运行
gem install bundler
。
我已经尝试过运行'gem install bundler'。它说,当我再次运行命令时它已安装,同样的错误显示。我使用时会出现此错误:'bundle -v'。但是,“哪个捆绑”说:
/home/MYUSER/.rvm/bin/bundle
这是'rvm info'的输出:
ruby-1.9.3-p194:
rvm:
version: "rvm 1.13.4 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "1 hour 23 minutes 15 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p194"
date: "2012-04-20"
platform: "x86_64-linux"
patchlevel: "2012-04-20 revision 35410"
full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"
homes:
gem: "/home/MYUSER/.rvm/gems/ruby-1.9.3-p194"
ruby: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194"
binaries:
ruby: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/rake"
environment:
PATH: "/usr/local/jdk/bin:/home/MYUSER/.rvm/gems/ruby-1.9.3-p194/bin:/home/MYUSER/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin:/home/MYUSER/.rvm/bin:/home/MYUSER/perl5/bin:/usr/kerberos/bin:/usr/lib/courier-imap/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/MYUSER/bin"
GEM_HOME: "/home/MYUSER/.rvm/gems/ruby-1.9.3-p194"
GEM_PATH: "/home/MYUSER/.rvm/gems/ruby-1.9.3-p194:/home/MYUSER/.rvm/gems/ruby-1.9.3-p194@global"
MY_RUBY_HOME: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: ""
我尝试过: 我尝试了link中的建议,但它不起作用。
谢谢。
答案 0 :(得分:9)
gem uninstall bundler && rvm @global do gem install bundler && bundle -v
默认情况下,rvm会将 bundler安装到@global gemset中,并将其混合为默认值。一些东西闻起来与安装,但这组命令应该修复它,如果这是坏的。你的rvm输出看起来并不疯狂。
答案 1 :(得分:1)
尝试:
rvm all do gem install bundler
这将在当前的ruby中安装bundler gem。
答案 2 :(得分:0)
Bundler可执行文件似乎没有安装在./bin目录中 如果你做了
bundle install --binstubs
这看起来像捆绑器中的BUG!
答案 3 :(得分:0)
对于我的设置,添加apache为rvm组运行的用户
usermod -a -G rvm www-data
答案 4 :(得分:0)
如果您使用rbenv
$ gem uninstall rbenv
(many dependencies will be unmet. Simply answer 'y')
$ rbenv rehash
$ gem install rbenv
$ rbenv rehash