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

1 minute read

Out Of Date Warning

This article was published on 01/11/2011, this means the content may be out of date or no longer relevant.
You should verify that the technical information in this article is still up to date before relying upon it for your own purposes.

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",

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