2012-07-27 79 views
0

我想在使用RVM和Bundler来管理我的应用程序环境的同时构建应用程序时使用支持库。使用RVM和Bundler引用本地gem?

在我的Gemfile是

# forked and cloned to local directory 
gem 'feedzirra', :path => '../../feedzirra' 

然后在命令行:

$ bundle install 
.. 
Using feedzirra (0.2.0.rc2) from source at /Users/ryan/dev/feedzirra 
.. 
$ bundle show feedzirra 
/Users/ryan/dev/feedzirra 
$ gem which feedzirra 
ERROR: Can't find ruby library file or shared library feedzirra 

IRB:

1.9.3p194 :001 > require 'feedzirra' 
LoadError: cannot load such file -- feedzirra 
    from /Users/ryan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /Users/ryan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from (irb):1 
    from /Users/ryan/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>' 

我缺少什么?

回答

2

需要在捆绑的上下文中运行它:

bundle exec gem which feedzirra 

bundle exec irb 
相关问题