Ok, after much pain I have now solved the problem. It was largely down to:
- Duplicate files in
/vendor/scripts
More details on how this came to pass and transient problem that I ran into in the process below:
Duplicate Files
- I noticed -- when looking at the
/vendor/scripts
directory -- that there were two Ember scripts (ember-latest and ember-1.0.rc.6). Ironically the one called rc.6 was actually an rc.5 build whereas the ember-latest was indeed rc.6. In either case, having two was clearly asking for trouble. - Because the "ember-latest" file was more current I went with that and removed the "rc.6" file.
- This then led to a transient error:
- I now only had one ember file in the
vendor.js
but Ember was being compiled AFTER ember-data - This called all sorts of dependency problems which aren't managed by common-js (as they are in app.js file)
- The
config.coffee
file does manage sequencing but that's when I noticed that it was referring to "rc.6" file not the "latest" file so effectively it was giving no instruction to the required sequencing between Ember and Ember-Data. Grrr. - Easily fixed though, I changed the
config.coffee
reference and it worked.
- I now only had one ember file in the
- Now that's great but HOW did I end up with two files in the first place?
- Well the Brunch skeleton I forked (brunch-with-ember-reloaded) has a Cakefile that provides a convenient way to pull down the latest ember and emberdata files:
cake getember
andcake getemberdata
. - Emberdata is fine, it creates a file called ember-data-latest.js which is the only naming convention for Ember-Data in that directory.
getember
, however, creates a file called ember-latest.js but the original file was the aforementionedember-1.0.rc.6
file.- so, in effect, the automation in the Cakefile led to the duplicate file and the newly downloaded Ember code was not the target of the Brunch solution but instead the static "rc.6" file.
- Well the Brunch skeleton I forked (brunch-with-ember-reloaded) has a Cakefile that provides a convenient way to pull down the latest ember and emberdata files:
Epilogue
I must say I'm glad to have that problem out of the way. If you're still reading along you may be interested to know that I have made all the needed changes to my forked Brunch skeleton. Please note that my repo has been modified to allow for JavaScript
coding instead of CoffeeScript
and I've also switched to using the LESS
processor instead of Stylus
.
Skeleton: brunch-with-ember-sideloaded