当我输入时,一切正常:
set rails_env=development
rspec spec/models/foo.rb
当我输入时,我的程序会遇到弃用警告:
set rails_env=test
rspec spec/models/foo.rb
->Rack::File headers parameter replaces cache_control after Rack 1.5.
我真的需要用rails_env=test
启动我的测试你知道发生了什么吗?
有用的信息:
C:\dev>ruby --version
ruby 1.9.3p385 (2013-02-06) [i386-mingw32]
C:\dev>rails --version
Rails 3.2.12
我的Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.12'
gem 'sqlite3'
gem 'delayed_job_active_record', '= 0.3.3'
gem 'delayed_job', '= 3.0.5'
gem 'clockwork'
gem 'dj_mon'
gem 'libxml-ruby'
gem 'haml-rails'
gem 'log4r'
gem 'spreadsheet'
gem 'mail'
gem "axlsx", "= 2.0.0"
gem 'axlsx_rails'
gem 'ruby-prof'
gem 'test-unit', :require => "test/unit"
gem 'ruby-oci8', '= 2.1.4'
gem 'pg', :require => 'pg'
gem 'devise', '<= 2.2.3'
gem 'cancan', '<= 1.6.9'
gem 'validates_timeliness'
gem 'will_paginate'
gem 'nokogiri'
gem 'simplecov'
gem 'google_visualr'
gem 'thin'
gem 'workflow'
gem 'ruby-graphviz'
gem 'ruby-odbc'
gem 'rubyzip', "= 0.9.9"
gem "rspec-deep-ignore-order-matcher"
gem 'rspec'
gem 'awesome_print'
gem 'syntax'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails', '2.3.0'
group :test, :development do
gem "rspec-rails", "~> 2.0"
end
我将我的rails版本更新为3.2.13。警告消失了,但我的应用仍然停滞不前。
答案 0 :(得分:1)
答案 1 :(得分:0)
感谢koffeinfre
。
我的测试数据库配置有错误,我不知道我已登录log/test.log
。
另外,感谢trh
和Peter Alfvin
指出弃用警告已在rails 3.2.13中修复。