Could not find RubyGem bundler

风流意气都作罢 提交于 2020-01-03 08:56:23

问题


I've cloned diaspora for github, git://github.com/diaspora/diaspora.git

I tried to install it. An error generated when I use bundle install.

$ bundle install 
/usr/local/lib/site_ruby/1.8/rubygems.rb:812:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:223:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:1146:in `gem'
    from /usr/bin/bundle:18

I'm using rails 3 and ruby 1.8 on ubuntu 11.04. How to fix it? Please help


回答1:


Did you install bundler gem?

$ gem install bundler

You might need sudo privileges.




回答2:


Hmm, maybe you've got the bundle command and bundler gem installed for /usr/bin/ruby, and after that installed another Ruby in /usr/local/bin/ruby?

Could you do a which ruby and head -1 /usr/bin/bundle? Maybe also a gem list?




回答3:


Presumably this has been fixed long ago, but for the benefit of others....

My issues was that while I had installed the bundler gem it had been installed in a different location to the current GEM_PATH - so it couldn't be found.

So,

GEM_PATH=/usr/lib/ruby/gems/1.8/ bundle install

did the business, setting the value of GEM_PATH to the actual location of the gems folder where the bundler gem has been installed.



来源:https://stackoverflow.com/questions/6466494/could-not-find-rubygem-bundler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!