为什么在Heroku slug编译期间没有编译这个新的CSS清单文件,而正常的应用程序清单工作正常?

ben*_*ben 3 ruby-on-rails heroku ruby-on-rails-3 asset-pipeline

我在Heroku Cedar堆栈上运行了Rails 3.2.11.我不编译资产在本地,他们所描述的自动塞在编译过程中编译,在这里.app/assets/stylesheets/new_manifest.css.scss除了默认设置,我刚刚创建了一个新的CSS清单文件application.css.scss.当我推送到Heroku时,这个清单文件没有被编译application.css.scss为.新的清单文件在开发中工作正常.为什么会这样?

application.rb中

config.assets.enabled = true
config.assets.version = '1.0'
config.assets.initialize_on_precompile = false
Run Code Online (Sandbox Code Playgroud)

production.rb

config.assets.compile = false
config.serve_static_assets = false
config.assets.compress = true
config.assets.digest = true
Run Code Online (Sandbox Code Playgroud)

Heroku推出的控制台输出

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Asset precompilation completed (83.62s)
Run Code Online (Sandbox Code Playgroud)

样本页面

<%= stylesheet_link_tag "new_manifest", media: "all" %>
Run Code Online (Sandbox Code Playgroud)

ben*_*ben 6

解决的办法是添加config.assets.precompile += %w( new_manifest.css )到production.rb,描述在这里.这在开发中不是必需的,但在生产中是必需的,这引起了我的困惑.