这里的文档说,Heroku在Rails4部署期间具有预编译资产。
但是,我看不到预编译资产消息。
Using thin (1.6.1)
Using twitter-bootstrap-rails (2.2.8)
Using uglifier (2.3.1)
Using will_paginate (3.0.4)
Your bundle is complete! It was installed into ./vendor/bundle
Bundle completed (1.37s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
Detected manifest file, assuming assets were compiled locally
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby -> console, rake, web, worker
我在应用程序中遇到引导程序问题,其中导航栏将无法正确加载+其他一些细微差别,我认为这是资产预编译问题。
我正在使用Rails4,Ruby2.0
我在application.rb中启用了资产
config.assets.enabled = true
手动预编译无济于事
heroku run rake assets:precompile
删除public / assets文件夹很有帮助。我也运行heroku运行rake资产:清理。
After that I could see:
----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
导航栏现在可以正常加载了!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句