I have seen many answers to similar posts on Stackoverflow and I tried implementing it but it is not working. I have done the following things
1) Removed //= require_tree . from assets/javascripts/application.js
2) Added //= require users in the assets/javascripts/application.js (where users.js is my javascript file in the same folder as the application.js resides)
In my new.html.erb I have included the following line
<%= javascript_include_tag "users" %>
3) users.js contains simple javascript code like "alert(6)"
When I make request to users/new thru localhost I do not get any alert although I can see my users.js included in the html but there is no code in that. Can anyone please help me on this??