运行黄瓜时无法激活机架

发布于 2024-11-09 06:46:10 字数 1021 浏览 0 评论 0原文

我无法再在 Rails 3 应用程序中运行 Cucumber。我不确定它是什么时候坏掉的,但我确实做了一些 rspec 工作,需要我使用 webrat gem 并且它在那之前就可以工作了。

我的错误是:

$ cucumber  
Using the default profile...  
can't activate rack (~> 1.2.1, runtime) for ["actionpack-3.0.7", "railties-3.0.7"], already activated rack-1.3.0 for ["rack-test-0.5.7", "cucumber-rails-0.4.1"] (Gem::LoadError)

这是我的 Gemfile

source 'http://rubygems.org'

gem 'rails', '3.0.7'  
gem 'sqlite3'  
gem 'devise'  
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'  
gem 'cancan'  

group :development, :test do  
  gem 'rspec-rails', '2.5.0'  
  gem 'rspec', '2.5.0' 
  gem 'webrat', ">= 0.7.2"  
  gem 'cucumber-rails'  
  gem 'capybara'  
  gem 'database_cleaner'  
  gem 'launchy'  
  gem 'factory_girl_rails'  
  gem 'spork'  
end  

如果我需要提供更多信息,请告诉我,我会编辑它。

我尝试在 Gemfile 中指定机架,但这似乎没有帮助,而且看起来也不正确。另外:如果我修改 Gemfile,我将运行“捆绑安装”,然后再次尝试 Cucumber。这是解决此问题的正确工作流程吗?

有人可以帮忙吗?

干杯,
轮缘

I can no longer run cucumber in my rails 3 app. I'm not sure exactly when it broke but I did do some rspec work that required me to use the webrat gem and it was working before that.

My error is:

$ cucumber  
Using the default profile...  
can't activate rack (~> 1.2.1, runtime) for ["actionpack-3.0.7", "railties-3.0.7"], already activated rack-1.3.0 for ["rack-test-0.5.7", "cucumber-rails-0.4.1"] (Gem::LoadError)

Here is my Gemfile

source 'http://rubygems.org'

gem 'rails', '3.0.7'  
gem 'sqlite3'  
gem 'devise'  
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'  
gem 'cancan'  

group :development, :test do  
  gem 'rspec-rails', '2.5.0'  
  gem 'rspec', '2.5.0' 
  gem 'webrat', ">= 0.7.2"  
  gem 'cucumber-rails'  
  gem 'capybara'  
  gem 'database_cleaner'  
  gem 'launchy'  
  gem 'factory_girl_rails'  
  gem 'spork'  
end  

Please let me know if I need to supply more info and I'll edit this.

I've tried specifying rack in my Gemfile but this doesn't seem to help and doesn't seem right. Also: If I modify my Gemfile I am running "bundle install" and then trying cucumber again. Is this the right workflow to solve this problem?

Can anyone please help?

Cheers,
Rim

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坚持沉默 2024-11-16 06:46:10

我的 IRC 频道中有人为我指明了正确的方向。

使用捆绑器的上下文(我还不太明白)

bundle exec cucumber

这工作得很好:)

Someone in my IRC channel pointed me in the right direction.

Use the context of bundler (which I don't quite understand yet)

bundle exec cucumber

This works just fine :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文