黄瓜不起作用,但耙黄瓜呢

Jonathans-MacBook-Air-2:hw3-rottenpotatoes Jonathan$ cucumber
WARN: Unresolved specs during Gem::Specification.reset:
      tzinfo (~> 0.3.37)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
You have already activated activesupport 4.0.0, but your Gemfile requires activesupport 3.2.14. Using bundle exec may solve this. (Gem::LoadError)
/Users/Jonathan/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup'
/Users/Jonathan/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
/Users/Jonathan/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/Users/Jonathan/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in `'

但似乎我在这个目录中有正确的rails版本。

Jonathans-MacBook-Air-2:hw3-rottenpotatoes Jonathan$ rails --version
Rails 3.2.14

我对红宝石很陌生,对于为什么“耙黄瓜”起作用,但“黄瓜”不在终端中感到困惑。 我不知道如何设置ruby和gems,但我有一种预感,那就是在我的工作目录中,ruby被告知使用rails 3.2.14,但命令“cucumber”只能检测到activitesupport 4.0.0(其中I相信是绑在铁轨上)

非常感谢!


cucumber是一个binstub,而rake cucumber是一个执行库的rake任务。

先尝试bundle install -—binstubs ,然后尝试cucumber

binstub可能过时了吗?

如果这不起作用,只需通过删除project/bin目录来bundle install -—binstubs ,然后重新运行bundle install -—binstubs


您安装了多个版本的Rails,并且cucumber不知道要使用哪个版本,所以它试图加载并错误地输出。

要使用Gemfile中指定的那个,请在所有命令之前指定bundle exec ,例如。 bundle exec cucumber

链接地址: http://www.djcxy.com/p/38765.html

上一篇: Cucumber doesn't work but rake cucumber does

下一篇: constant Logger::Format not defined (NameError) with activerecord