【发布时间】:2016-02-10 11:59:14
【问题描述】:
我正在参加关于 rails 的 coursera 入门课程,但在使用 gems 时遇到了一些问题。
当我在一个新的 rails 项目上运行 rspec 时,我得到了这个错误:
/Users/mme/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:34:in `block in setup':
You have already activated poltergeist 1.9.0, but your Gemfile requires poltergeist 1.6.0.
Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
根据How to switch between different version of gem installed?,我应该可以使用bundle exec [gem]
$ bundle exec poltergeist
bundler: command not found: poltergeist
Install missing gem executables with `bundle install`
这没有意义 - 我以前使用过 poltergeist:
$ bundle install | grep poltergeist
Using poltergeist 1.6.0
有人对如何调和这种情况有一些建议吗?
【问题讨论】: