0

当我尝试在控制台中运行 cucumber 时,我收到此错误..

Rack::File headers parameter replaces cache_control after Rack 1.5.
uninitialized constant Cucumber::Rails::Database (NameError) /path_to/app_name/features/support/env.rb:57:in
'`

这是我的 Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.9'

gem 'pg'

gem 'devise'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  gem 'therubyracer', :platforms => :ruby
  gem "less-rails"
  gem "twitter-bootstrap-rails", :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

gem 'slim'

# Omniauth gems
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-google-oauth2'

# Images
gem 'rmagick', '2.13.2'
gem 'carrierwave'

# feed
gem 'feedzirra'

#cron
gem 'whenever', :require => false

#search
gem 'sunspot_rails'
gem 'sunspot_solr'

#ActiveAdmin
gem 'activeadmin'

group :test do
  gem 'cucumber-rails', :require => false
  gem "rspec-rails"
  gem 'factory_girl_rails'
  gem "email_spec"
  gem "pickle"
  gem 'database_cleaner'
end

group :development do
  gem "rspec-rails"
  gem "thin"
  gem "capistrano"
end

我不知道发生了什么,我只是猜测这可能是一些宝石冲突,但我真的不知道。

我找到了其他答案,但它仍然失败..欢迎任何帮助!

4

1 回答 1

0

出于某种原因,我有一个旧版本的 cucumber-rails gem,所以我不得不把

在 Gemfile 中:

gem 'cucumber-rails', '~> latest_version', :require => false

并运行:

bundle update

一切都开始工作了!

于 2013-05-11T02:11:03.780 回答