1
votes

I'm attempting to use Ember Data with Ember.js version 1.0.0-pre2. The Ember docs on the website say just to download Ember Data from GitHub. This isn't working because Ember Data is trying to call Ember.merge() which isn't present in the 1.0.0-pre2 release.

Which version combo of Ember and Ember Data am I supposed to be using? I tried using the latest commit from Ember's master branch but it breaks my App's router, so I assume it isn't stable.

Here's a copy of my router that breaks in the latest versions (I believe it was pasted from an Ember code sample):

 
var App = Ember.Application.create({ });
App.Router = Ember.Router.extend({
    enableLogging: true,
    root: Ember.Route.extend({
        aRoute: Ember.Route.extend({
            route: '/',
            enter: function(router) {
              console.log("entering root.aRoute from", router.get('currentState.name'));
            },
            connectOutlets: function(router) {
              console.log("entered root.aRoute, fully transitioned to", router.get('currentState.path'));
            }
        })
    })
});
4
Get the latest from both Ember and Ember-Data repositories and build them. While Ember-Data is still under 1.0, you should always use the latest release available (currently revision 11), but you'll have to build them yourself.MilkyWayJoe
I tried doing that but using the latest commits from both master branches appears to be unstable. Among other things, my App's router stops working (can't even get enableLogging to take effect).Zack Angelo
Can you post a minimum code with your definition for the Router? I've built Ember today and I have the router working fine on my end.MilkyWayJoe
I've updated my question with the exact code sample that wasn't working.Zack Angelo
The emberjs.com/guides on the emberjs.com website has been updated to demonstrate the new router.CraigTeegarden

4 Answers

2
votes

If you want to use Ember Data with the version of Ember.js distributed on their website (1.0.0-pre2), the newest version you can use is revision 10. The commit this corresponds to isn't documented anywhere, I had to step through the commits and find it. I've compiled it and uploaded it here in case anyone else needs it:

Latest Ember Data Revision 10 Build

1
votes

You only need to build the latest Ember-Data... the result will be found in the 'dist' directory. You can also find the version of Ember.js that that particular build of Ember-Data relies on within that directory as well.

Cheers.

1
votes

After cloning the repo I was able to get REVISION 10 by doing a reset --hard:

git clone https://github.com/emberjs/data.git ember-data.git                                                             
cd ember-data.git
git reset --hard 796cc1920f53dbe858430cb142f7432f32251f06

That got me running again.

0
votes

Git clone https://github.com/emberjs/data.git and set the right revision when you delare your store.

APP.store = DS.Store.create({
    revision: 11
})

You'll be instructed if you're using anything that has been deprecated. I think you'll be better off with newest version as things are moving quickly and thus bugs getting fixed.