Rails 3 黄瓜加载错误
我正在尝试让 Cucumber 与 Rails 3 一起使用。
但每当我尝试运行黄瓜功能时,我都会收到加载错误。
cucumber-0.7.3/lib/cucumber/ast/feature_element.rb:2:in `require': no such file to load -- gherkin/parser/tag_expression (LoadError)
我已将以下 gem 添加到
gem "rspec", '>= 2.0.0.beta.19'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails', '~> 0.1.1.rc6'
gem 'cucumber', '~> 0.7.0.beta.8'
gem 'rspec-rails', '~> 2.0.0.beta.19'
gem 'spork'
gem 'launchy'
我在 ruby-1.9.2-p0
上运行的
Gemfile有什么建议吗?
I am trying to get cucumber to work with Rails 3.
But whenever I try to run the cucumber features I get an load error.
cucumber-0.7.3/lib/cucumber/ast/feature_element.rb:2:in `require': no such file to load -- gherkin/parser/tag_expression (LoadError)
I have added the following gems to the Gemfile
gem "rspec", '>= 2.0.0.beta.19'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails', '~> 0.1.1.rc6'
gem 'cucumber', '~> 0.7.0.beta.8'
gem 'rspec-rails', '~> 2.0.0.beta.19'
gem 'spork'
gem 'launchy'
I'm running on ruby-1.9.2-p0
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的错误,并且能够通过强制将小黄瓜加载到 Gemfile 中而不是作为黄瓜依赖项来克服它。
因此,将特定版本分配给 Gherkin 并将 >= 分配给黄瓜:
I was getting the same error and was able to move past it by forcing gherkin to be loaded in Gemfile instead of as a cucumber dependency.
So, assigning specific version to Gherkin and >= to cucumbers: