2015-08-03 62 views
1

當我在production中使用capistrano進行部署時,出現以下錯誤。但在staging我沒有收到警告信息。tsort.rb關於static_assets的奇怪棄用警告

DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in tsort_each at /home/deploy/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:226) 

而且,我的兩個production.rb和staging.rb環境文件有下面這行註釋: #config.serve_static_files =真

+0

請出示完整回溯和你的Gemfile的相關部分。 – EugZol

+0

這只是一個警告貶值,那麼,搜索項目文件夾中的'serve_static_assets'我相信你會發現'serve_static_assets'用'serve_static_files'替換它,並愉快地部署。嗯,這只是爲了您的頭腦安寧:) !!! –

+0

問題是,我找不到任何地方引用serve_static_assets! production.rb和staging.rb配置文件非常相似,都沒有設置... – pastullo

回答

0

最終我意識到,很久以前我就加入了寶石,使該應用程序在Heroku上工作。

離開heroku後,該寶石仍然在Gemfile中,並導致錯誤。 我固定它通過刪除如下:

gem 'rails_12factor'