views:

344

answers:

0

I have my CSS and JS set to cache in RAILS_ROOT/app/views/layouts/application.html.erb:

<%= stylesheet_link_tag 'reset', ...
                        'layout', 'colors', :cache => 'cache/all' %>
<%= javascript_include_tag 'jquery-1.3.2.min', ...
                           'application', :cache => 'cache/all' %>

If I turn on caching in my development environment, everything works as planned:

# in RAILS_ROOT/config/environments/development.rb:
config.action_controller.perform_caching = true

When I put the same line in staging, though, /stylesheets/cache/all.css is generated properly, but /javascripts/cache/all.css isn't. The line is generated in the HTML as though it were, though:

<script src="/javascripts/cache/all.js?1253556008" type="text/javascript"></script>

Going to that URL yields an empty JS file (though not a 404, oddly). There is no file on the file-system (under RAILS_ROOT/public/javascripts/cache/all.js).

Any thoughts?