I recently updated the application from Rails 3.0 to 3.1. I followed all the instructions that I could find to enable the resource pipeline, but it always fails when in the production environment:
<%= javascript_include_tag "application" %>
gives me
<script src="/javascripts/application.js" type="text/javascript"></script>
in which there is no digest, and I get the following error:
cache: [GET /javascripts/application.js] miss Started GET "/javascripts/application.js" for 127.0.0.1 at 2011-10-03 23:31:36 +0100 ActionController::RoutingError (No route matches [GET] "/javascripts/application.js"):
I tried variations of these settings in application.rb:
require File.expand_path('../boot', __FILE__)
and full production.rb (minus some comments)
Blog::Application.configure do config.cache_classes = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = false config.assets.compress = true config.assets.compile = false config.assets.digest = true config.i18n.fallbacks = true config.active_support.deprecation = :notify end
I completed the rake assets:precompile .
I do not see any obvious steps?
Edit: Additional Information:
My assets are in the app/assets folder. app/assets/images , app/assets/javascripts , app/assets/stylesheets , etc.
I see my files generated in my public/assets directory with names and digests.
app/assets/javascripts/application.js really compiles with something like public/assets/application-6ec417a53cb2bdb949966a153a61e7b1.js . They end in the public directory.
tpower
source share