2015-08-21 228 views
0

在我的項目我紅寶石rbenv寶石沒有找到

require 'log4r' 

,但我得到運行下面的錯誤消息,當ruby app.rb

/Users/mattw/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- log4r (LoadError) 
from /Users/mattw/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /Users/mattw/projects/placetel/config/initializers.rb:1:in `<top (required)>' 
from /Users/mattw/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /Users/mattw/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from app.rb:1:in `<main>' 

如果我做bundle show它會給我:

Gems included by the bundle: 
* bundler (1.10.6) 
* curb (0.8.1) 
* log4r (1.1.10) 
* nori (1.1.3) 

我使用rbenv 0.4.0和bundler 1.10.6本地運行ruby 2.1.3

+0

你有沒有運行log4r'後''束install'加入到'Gemfile'? – mudasobwa

回答