我运行bundle install
并获得一份列表,说明所有宝石都已安装。
bundle show shotgun => /usr/local/lib/ruby/gems/2.1.0/gems/shotgun-0.9
shotgun webpost.rb =>
/Users/angela/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'shotgun' (>= 0) among 8 total gem(s) (Gem::LoadError)
from /Users/angela/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
from /Users/angela/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /usr/local/bin/shotgun:22:in `<main>'
问题:Bundler说安装了宝石,但无论是运行它们还是试图从irb中获取它们都显示它们没有用!我如何访问我的宝石?
答案 0 :(得分:0)
您可能需要在bundler上下文中运行命令:
bundle exec shotgun webpost.rb