SMT['...'] is a gem I've used that compiles the mustache files into Javascript - smt_rails
I've tried loading the templates in the page (show.html.haml) but the same thing happens i.e. the application.mustache will load fine but the toolbar does nothing.
So I've moved both templates into the page and I've added a simple 'console.log('hello n')' to:
- show.html.haml (at bottom): hello 1
- toolbar.js.coffee (at top): hello 2
- app.js.coffee (at top of $.ready): hello 3
Below is the output I get from the console:
As you can see the toolbar.js.coffee is out putting before anything else and doesn't get called again after the main application control. This is also why the error is happening as the show.html.haml file hasn't even loaded yet, which has the template on (#toolbar-template).
I've updated my gist to reflect the changes I have done, which might help.