In the process of debugging this problem, I tried to run the application locally and does not serve any assets. In addition, I have an intermediate environment in the Heroku application (separate from my Heroku application), which also now displays HTML without any assets.
To debug, I:
- Kill the server
- Clear tmp / cache / assets
- Delete publication / assets
- Run
rake assets:precompile - Start the
rails s -e production server - Go to the page and open the web inspector, and by clicking on the extension arrow for the application.css link, you will answer
Reload the page to get source for: http://localhost:3000/assets/application-e1f3e0c864a153c7iu66f8772a886376.css - Reload the page does nothing.
production.rb
config.cache_classes = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" config.assets.compress = false config.assets.compile = false config.assets.digest = true
Staging.rb
config.cache_classes = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" config.assets.compress = false config.assets.compile = false config.assets.digest = true
Application.rb
config.assets.enabled = true config.assets.version = '1.0' config.assets.initialize_on_precompile = false
The following is a link to the stylesheet and javascript in layout / application.html.erb:
<%= stylesheet_link_tag "application", :media => "screen, handheld" %> <%= javascript_include_tag "application" %>
source share