2013-10-13 164 views
0
 
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(它我相信是绑在铁轨上)

非常感谢!

+0

你能显示你的gemfile吗? – rb512

+5

你尝试过“捆绑exec黄瓜”吗?看起来你已经在你的gemfile外部安装了rake,并且正在被拾取。但是你没有在你的gemfile外部安装黄瓜。 – Anko

回答

0

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

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

也许binstub是不知何故过时?

如果不工作,只是通过删除project/bin DIR杀binstubs,并重新运行bundle install -—binstubs

+0

'cucumber'不是一个binstub ....'bin/cucumber'会是一个binstub。 – sevenseacat

+0

'cucumber'命令_is a_ binstub,位于'bin/cucumber'。 – kross

+0

不是在Rails 3项目中,除非你专门将它添加为一个,我认为用户还没有完成。 – sevenseacat

0

您必须安装和黄瓜不知道哪个用Rails的多个版本,因此它试图加载两者都出错了。

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