开发者

Can't activate rack when running 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


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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜