Over a million developers have joined DZone.

Setting up an Ember Project Using Yeoman in Ubuntu 14.04

· Java Zone

Learn more about the advantages of moving from a monolithic to microservices architecture.  Brought to you in partnership with IBM.

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 ..

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 '' to access the server from outside                hostname: ''            },

From Idea to Application gives you the architecture to quickly build, manage and run a range of applications (web, mobile, big data, new smart devices, etc.) on an open-standard, cloud-based platform. See why developers are using IBM Bluemix. Brought to you in partnership with IBM.


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

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

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

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

{{ parent.tldr }}

{{ parent.urlSource.name }}