1

I've just deployed a Rails 4.1.1 app to a VPS. Running Ruby 2 and Passenger.

My application is not making requests to the fingerprinted version of the asset files. In my application.html.erb I have:

<%= stylesheet_link_tag    "application" %>
<%= stylesheet_link_tag "slick" %>
<%= javascript_include_tag "vendor/modernizr" %>

Generating output html of:

<link href="/stylesheets/application.css" media="screen" rel="stylesheet" />
<link href="/stylesheets/slick.css" media="screen" rel="stylesheet" />
<script src="/javascripts/vendor/modernizr.js"></script>

Relevant config is:

production.rb

config.serve_static_assets = false
config.assets.js_compressor = :uglifier
config.assets.compile = false
config.assets.digest = true
config.assets.version = '1.0'
config.assets.precompile += %w( vendor/modernizr.js slick.css )
Robin Fisher
  • 1,454
  • 1
  • 13
  • 23

1 Answers1

-2

It seems you are not precompiling assets. In your production.rb make following change

config.assets.compile = true
Shweta
  • 1,171
  • 7
  • 11
  • That directive is where you want Sprockets to compile assets on the fly in production and [that is not good](http://stackoverflow.com/questions/8821864/config-assets-compile-true-in-rails-production-why-not). I am precompiling and MD5 fingerprinted assets are in my public/assets directory. – Robin Fisher Jan 07 '15 at 16:45