Closed explainer closed 12 years ago
The blank line in the above example is my typo, it was not in the original.
Will look into this for the next release.
How is it supposed to be? I tried
//= require_tree ./models
//= require_tree ./collections
etc.
But it didn't work.
Nvm, I'm retarded, I didn't realize the //= require_tree .
before requiring underscore and backbone required those files too...
So, just to be clear, the fix (for those still experiencing this) is to remove the //= require_tree .
line from application.js
I was following the RailsCast tutorial #323, which is part one of the backbone-on-rails set. While following along in the tutorial, I ran the following command:
rails g backbone:install
The command generated the standard folders for models, routes, collections, and views, but it also generated manifest entries into my application.js file which are as follows:
//= require jquery //= require jquery_ujs //= require_tree . //
// begin backbone generated entries // //= require underscore //= require backbone // //= require .//raffler // //= require_tree ../templates/ //= require_tree .//models //= require_tree .//collections //= require_tree .//views //= require_tree .//routers // // end backbone generated entries
As you can see, the folder syntax for the models, etc. are malformed, and will cause js uncaught exception errors if not repaired manually.