Zack Angelo
Zack Angelo

Reputation: 423

Which Ember Data version to use with Ember.js 1.0.0-pre2?

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'));
            }
        })
    })
});

Upvotes: 1

Views: 766

Answers (4)

ken
ken

Reputation: 3745

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.

Upvotes: 0

opennomad
opennomad

Reputation: 137

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.

Upvotes: 1

hilem
hilem

Reputation: 23

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.

Upvotes: 1

Zack Angelo
Zack Angelo

Reputation: 423

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

Upvotes: 2

Related Questions