I am trying to create view/controller specific Javascript in Rails 3.1. I have followed the method from Rails 3.1 asset pipeline: how to load controller-specific scripts? and http://tech.thereq.com/post/10754558724/the-rails-3-1-asset-pipeline-in-the-real-world-jquery.
This works great in my development environment. However, it fails in my production environment. I get the message, ActionView::Template::Error (users.js isn't precompiled).
My user.js.coffee file inside the .../app/assets/javascript directory contains
//= require i18n/grid.locale-en
//= require jquery.jqGrid.min
//
//= require grid_object.js
My index.html.haml file inside .../app/views/users contains
- javascript 'users'
...
My application_helper contains
def javascript(*files)
content_for(:head) { javascript_include_tag(*files) }
end
My application layout file contains
%= yield(:head) %>
Lastly, my application.js file inside .../app/assets/javascript contains
//= require jquery
//= require jquery-ui
What am I missing?