How to Update to the Latest Ember, Ember Data and Ember CLI

Updating Ember is not rocket science, but many times a short guide can be very helpful. So here it is.

Remember all commands should be run inside our app’s directory.

Upgrade Ember

To find out the latest stable version, click here.

In this example, 2.3.0 is the latest version. We install it via bower, specifying the particular version as ember#2.3.0 and including the save flag (to persist it to bower.json).

If we are prompted to choose a version of Ember, we will pick 2.3.0. So in this case we answer !3, prepending a ! to make sure it’s saved:

$ bower install ember#2.3.0 --save

bower ember#2.3.0           not-cached git://github.com/components/ember.git#2.3.0
bower ember#2.3.0              resolve git://github.com/components/ember.git#2.3.0
bower ember#2.3.0             download https://github.com/components/ember/archive/2.3.0.tar.gz
bower ember#2.3.0             progress received 1.6MB of 1.7MB downloaded, 96%
bower ember#2.3.0              extract archive.tar.gz
bower ember#2.3.0         invalid-meta ember is missing "ignore" entry in bower.json
bower ember#2.3.0             resolved git://github.com/components/ember.git#2.3.0
bower ember#>=1.4               cached git://github.com/components/ember.git#2.3.0
bower ember#>=1.4             validate 2.3.0 against git://github.com/components/ember.git#>=1.4

Unable to find a suitable version for ember, please choose one:
    1) ember#2.2.0 which resolved to 2.2.0 and is required by todo-app
    2) ember#>=1.4 which resolved to 2.3.0 and is required by ember-cli-shims#0.1.0
    3) ember#2.3.0 which resolved to 2.3.0

Prefix the choice with ! to persist it to bower.json

? Answer !3
bower ember                 resolution Saved ember#2.3.0 as resolution
bower ember#2.3.0              install ember#2.3.0

ember#2.3.0 bower_components/ember
└── jquery#1.11.3

Done!

Upgrade Ember Data

Since 2.3.0, Ember Data is a full-fledged Ember CLI add-on. This means we can install it, like any other add-on, through ember install.

To find out the latest stable version, click here.

With that bit of info (in this case, 2.3.2), on to the installation:

$ ember install ember-data@2.3.2

Installed packages for tooling via npm.
Installed addon package.

Done!

Upgrade Ember CLI

To find out the latest stable version, click here. That link will provide detailed installation instructions, which boil down to uninstalling, cleaning and installing:

$ npm uninstall -g ember-cli
$ npm cache clean && bower cache clean
$ npm install -g ember-cli@2.5.0

A quick version check will tell us if this went alright:

$ ember -v
version: 2.5.0
node: 4.3.1
os: darwin x64

Further, launching the app we can verify our Ember and Ember Data versions are properly set up:

$ ember server
Livereload server on http://localhost:49152
Serving on http://localhost:4200/

This is what we get in the console:

Success!

I have this summary in my bookmarks and access it frequently. I hope you find it useful, too!

Enjoyed this article? Don't miss my next one!

Leave me your e-mail for content that will help you master Ember.js fast:

(A few e-mails per month. No BS. Unsubscribe anytime!)

Do you want to master Ember fast?

Leave me your e-mail for helpful updates delivered straight to your inbox.

(A few e-mails per month. No BS. Unsubscribe anytime!)