How to Update to the Latest Ember, Ember Data and Ember CLILast reviewed with Ember 2.9.x
Updating Ember is not rocket science, but many times a short guide can be very helpful. So here it is.
To find out the latest stable version, click here.
In this example, it’s
If we need to perform a minor upgrade (for instance from version
2.9.1), we can try:
$ bower i ember#2.9.1 --save && ember i email@example.com
Upgrading Ember CLI
Remove current Ember CLI:
$ npm uninstall -g ember-cli
$ npm cache clean && bower cache clean
Install new Ember CLI:
$ npm install -g firstname.lastname@example.org
Upgrading an Ember (and Ember Data) project
- Remove all temp folders:
$ rm -rf node_modules bower_components dist tmp
npmdependencies, saving Ember CLI as one of them:
$ npm install --save-dev email@example.com
$ bower install
The last important step is running the new project blueprint to our existing project. It allows us to review changes before applying (diff by pressing
$ ember init installing app ? Overwrite .editorconfig? Yes, overwrite ? Overwrite .jshintrc? Yes, overwrite ? Overwrite .travis.yml? Yes, overwrite ? Overwrite README.md? Yes, overwrite ? Overwrite app/index.html? Yes, overwrite ? Overwrite app/router.js? Yes, overwrite ? Overwrite bower.json? Yes, overwrite ? Overwrite config/environment.js? Yes, overwrite ? Overwrite .gitignore? Yes, overwrite ? Overwrite package.json? Yes, overwrite ? Overwrite tests/.jshintrc? Yes, overwrite ? Overwrite tests/helpers/module-for-acceptance.js? Yes, overwrite ? Overwrite tests/index.html? Yes, overwrite identical .bowerrc overwrite .editorconfig identical .ember-cli overwrite .jshintrc overwrite .travis.yml identical .watchmanconfig overwrite README.md identical app/app.js overwrite app/index.html identical app/resolver.js overwrite app/router.js overwrite bower.json overwrite config/environment.js identical ember-cli-build.js overwrite .gitignore overwrite package.json identical public/crossdomain.xml identical public/robots.txt create testem.js overwrite tests/.jshintrc identical tests/helpers/destroy-app.js overwrite tests/helpers/module-for-acceptance.js identical tests/helpers/resolver.js identical tests/helpers/start-app.js overwrite tests/index.html identical tests/test-helper.js ⠋ Installing packages for tooling via npm Installed packages for tooling via npm. Installed browser packages via Bower.
Double-checking and booting the server
A quick version check will tell us if this went alright:
$ ember -v ember-cli: 2.9.1 node: 6.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:
I have this summary in my bookmarks and access it frequently. I hope you find it useful, too!