【问题标题】:Trouble "activating" gem version麻烦“激活” gem 版本
【发布时间】: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

有人对如何调和这种情况有一些建议吗?

【问题讨论】:

    标签: ruby rubygems


    【解决方案1】:

    试试:

    bundle exec rspec
    

    错误提示“将bundle exec 添加到您的命令” - 字面意思是在rspec 命令之前添加bundle exec

    【讨论】:

      猜你喜欢
      • 2010-12-31
      • 2011-05-21
      • 1970-01-01
      • 1970-01-01
      • 2011-01-06
      • 1970-01-01
      • 1970-01-01
      • 2010-11-11
      • 2011-06-12
      相关资源
      最近更新 更多