Last Updated: February 25, 2016
· wildtangent

Rails 4 javascript_include_tag Gotcha

If you have a asset manifest file e.g.

= javascript_include_tag("admin/admin")
=> /app/assets/javascripts/admin/admin.js.coffee

The javascriptincludetag helper doesn't pick this up properly, instead giving you:


The correct way in Rails 4 appears to be

= javascript_include_tag("admin/application")

Rename your admin/admin.js.cofeee=> admin/application.js.coffee and it will correctly render


Not sure why but it caught me out