Skip to content

Instantly share code, notes, and snippets.

@pablobm
Last active May 25, 2016 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablobm/4d7514f4c89a1c8b50c76086c48b74e3 to your computer and use it in GitHub Desktop.
Save pablobm/4d7514f4c89a1c8b50c76086c48b74e3 to your computer and use it in GitHub Desktop.
Ember workshop - setup

Preparation

Please install the following:

  • The Ladder API app (Rails)
  • A newly created, empty Ember app
  • Ember Inspector extension for your browser

Please do this ahead of the workshop. There are a few things that can go wrong. Even if they don't, downloading all npm dependencies is slow.

Setting up the Ladder API

This is bog-standard Rails. I also prepared a branch with seed data:

git clone https://bitbucket.org/pablobm/ladder-api.git
cd ladder-api
git checkout ember-workshop
bundle install
cp .env.example .env
./bin/rake db:reset

Starting a new Ember project

NPM is a very annoying piece of software and as a result some parts of Ember's tooling aren't super-friendly. I'm on the bench this week; please give me a shout if you have problems at any step. I'll happily assist each one of you individually.

With Homebrew

Homebrew seems to have a decent version of npm. Please make sure your Homebrew is up to date!

$ brew update
$ brew upgrade
$ brew install node
$ brew install npm

With nvm

Alternatively, there's an NPM version manager called nvm that you could use instead: https://github.com/creationix/nvm

If you are on Linux you probably know, but just in case: DO NOT use the NPM provided by your package manager. Use nvm.

The actual Ember stuff

Install ember-cli:

$ npm install -g ember-cli

Double-check that you got a version in the 2.x:

$ ember -v
ember-cli: 2.5.0
node: 5.10.1
os: darwin x64

Now create the project we'll be building:

$ ember new ember-workshop

Double-check that the correct version of Ember (a recent 2.x) was put in the project. Check bower.json (note it's not package.json):

$ cd ember-workshop
$ cat bower.json
{
  "name": "ember-workshop",
  "dependencies": {
    "ember": "~2.5.0",
    "ember-cli-shims": "0.1.1",
    "ember-cli-test-loader": "0.2.2",
    "ember-qunit-notifications": "0.1.0"
  }
}

Ember Inspector

For Chrome: https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi?hl=en

For Firefox: https://addons.mozilla.org/en-GB/firefox/addon/ember-inspector/

@iainbeeston
Copy link

NPM?

WHAAAA????

@iainbeeston
Copy link

No ember cli?

@pablobm
Copy link
Author

pablobm commented Apr 19, 2016

Yes ember cli. There was a mistake that Ismael spotted and has been corrected.

@iainbeeston
Copy link

iainbeeston commented Apr 22, 2016

@pablobm is it worth also running ember serve at the end and checking the site loads on localhost:4200?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment