ActionController :: Dispatcher(NameError)

时间:2013-01-23 02:40:45

标签: ruby-on-rails cucumber rack

我正在使用Rspec书。在第19章中,他们为Rails项目设置了一个测试环境

group :development, :test do
  gem "rspec-rails", "2.0.0"
  gem "cucumber-rails", "0.3.2"
  gem "webrat", "0.7.2"
end

当我尝试运行黄瓜时,我收到此错误。

bundle exec rake cucumber
/Users/kk/.rbenv/versions/1.9.3-p327/bin/ruby -S bundle exec cucumber  --profile default
Using the default profile...
Rack::File headers parameter replaces cache_control after Rack 1.5.
uninitialized constant ActionController::Dispatcher (NameError)

这部分错误信息......

 Rack::File headers parameter replaces cache_control after Rack 1.5.

...很常见(根据Google搜索)。但是,我可以找到与我的开发环境相关的任何信息。任何人都可以解释

这是我的宝石文件

source 'https://rubygems.org'

gem 'rails', '3.2.11'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

group :development, :test do
  gem "rspec-rails", "2.0.0"
  gem "cucumber-rails", "0.3.2"
  gem "webrat", "0.7.2"
end

1 个答案:

答案 0 :(得分:0)

即使它仍然发出部分错误消息

Rack::File headers parameter replaces cache_control after Rack 1.5.

我让黄瓜工作,但我不确定哪个步骤对变化负责。

我添加了require语句。

 gem "cucumber-rails", "1.3.0", :require => false

我还在gemfile中添加了nokogiri。