Rails 3.1 Assets: Own javascripts and css independent of application manifest

1st November 2011 – 83 words

Sometimes, one want to use seperate stylesheets or javascript independent of the asset-manifest, e.g. to only include specific js on some pages. Working well in development, turns out in production the files are not compiled and provided (404 Error). To fix this, include the files explicitly in config/application.rb or config/environments/production.rb like this:

 config.assets.precompile += ["jquery.tablescroll.js", "markitup/jquery.markitup.js",
      "textile.css.scss"]

Reposted from notes.it-jobs-und-stellen.de