I have a manifest file that looks as follows:
# director.js
//= require jquery
//= require jquery_ujs
//= require jquery-ui-1.8.22.custom.min
//= require_tree ./tablet/director
which is pretty much the same as my application.js file except for the require_tree which points to another directory. My layout file looks has the following in the head:
= javascript_include_tag "director"
and I have pre compiled my assets in my environments/development.rb file using
config.assests.precompile += %w{ director.js }
yet for some reason my unobtrusive javascript isn’t working. When I try to go to the delete action of a controller it looks for the show action, however opening firebug shows me that all the jquery files have been loaded. I really have no idea what is going on. Also when I change the javascript_include_tag to include “application” it works fine. I’m not sure what I have missed thats causing this. Any help would be great.
environments/development.rb tells me you’re doing this for developement. As far as I know, you don’t really want to precompile in the development environment. You do however have to add that line for production.