Rails emits warning: “Rack::File headers parameter replaces cache_control after Rack 1.5”

匿名 (未验证) 提交于 2019-12-03 02:49:01

问题:

I've recently upgraded my Rails to v3.2. The server starts and works, however I'm noticing the following warning:

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

In my development.rb I have the following configuration for cache control:

config.static_cache_control = "public, max-age=36000" 

What does the warning mean and what should I do to address it?

回答1:

The warning is caused by a call from within Rails itself. The warning has been fixed in Rails 3.2.13.



回答2:

You have to upgrade Rake file. This issue occurred in Rails 3.2.12 but solved in Rails 3.2.13 to solve this issue. You have to delete your Gemfile.lock from your app (NOTE: As you may get error something like "Rakefile locked", Take backup of Gemfile.lock file if this solution won't help).

Open your Gemfile and find gem 'rails', '3.2.12' and replace it with gem 'rails', '3.2.13' then in your terminal run bundle install. Now you will not get this warning.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!