Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Setting up an Ember Project Using Yeoman in Ubuntu 14.04

DZone's Guide to

Setting up an Ember Project Using Yeoman in Ubuntu 14.04

· Java Zone
Free Resource

The single app analytics solutions to take your web and mobile apps to the next level.  Try today!  Brought to you in partnership with CA Technologies

1. We need C++ compiler.

sudo apt-get install build-essential libssl-dev

2. Install git, bower needs this for fetching dependencies.

sudo apt-get install git

3. Install NVM. Find latest version of NVM from https://github.com/creationix/nvm.

curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash

4. Install node through NVM. Do not install node through apt-get nodejs as this will result in npm install commands always requiring root user access and causing “EACCESS” errors. Latest version of node at this time was 0.10.30. After installation close and re-open terminal.

nvm install 0.10.30

5. Install compass, this is also required by the grunt command. This requires ruby to be present.

sudo gem install compass

6. Install libfontconfig – this is required by PhantomJS. 

sudo apt-get install libfontconfig

7. PhantomJS is required by Grunt, so install that via npm.

npm install -g phantomjs

8. Install Yeoman. Don’t do this with “sudo”!

npm install -g yo

9. Install ember generator. Don’t do this with “sudo”!

npm install -g generator-ember

 10. Create a project director and cd to that directory.

mkdir my-proj
cd my-proj

11. Create the project scaffolding.

 yo ember

12. Do a bower install in the test directory

cd testbower install

12. Build the project.

cd ..
grunt

13. Start the application. Checkout the app at localhost:9000 (default port is 9000).

grunt serve

14. I found that the path to NVM is set up temporarily and it gets lost when we exit the shell. So next time, you may find that yo, grunt commands are not in path. To fix this make a permanent entry in the profile file.

Example: export PATH=/home/vagrant/.nvm/v0.10.30/bin:$PATH

Your ember project is initialized and checked out! If you are running the app in a vagrant instance, make sure you replace the server config in Grunt.js

connect: {            options: {                port: 9000,                // change this to '0.0.0.0' to access the server from outside                hostname: '0.0.0.0'            },
...

CA App Experience Analytics, a whole new level of visibility. Learn more. Brought to you in partnership with CA Technologies.

Topics:

Published at DZone with permission of Abishek Baskaran, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}