/ember-sc-bostonember

Ember SC run through of the BostonEmber demo

Primary LanguageRuby

Ember-SC Follow-Along of Boston Ember Group's Ember/Ember-CLI/Rails Tutorial

Boston Ember's tutorial can be found here:

This code base demonstrates the Ember application reading data from the Rails application.

Installation

If you are interested in following along, installation instructions can be found in part 1 of the tutorial above.

Or...

You can follow these installation instructions to cut to the end of the tutorial.

Installation Instructions

These are the instructions to follow if you simply want to see the Ember application read data from the Rails application.

Prerequisites

You should have installed the following:

  1. Ruby (version 1.9.3 or higher)
  2. RVM
  3. Node
  4. Npm

Installation Steps

  1. In your work directory, retrieve the Ember and Rails projects as one git cloning:

    git clone https://github.com/Ember-SC/ember-sc-bostonember.git
    cd ember-sc-bostonember

Ember:

  1. Go into the embersc directory to set up the client system:

    cd embersc
  2. Install everything:

    npm install
    bower install
  3. Run regression tests

    ember server

    Then browse http://localhost:4200/tests and watch them run.

Rails:

  1. Go into the rails directory to set up rvm:

    cd ../rails

    Observe that the rvm gemset is created:

    ruby-1.9.3-p545 - #gemset created /Users/SSmith/.rvm/gems/ruby-1.9.3-p545@ember-sc-bostonember
    ruby-1.9.3-p545 - #generating ember-sc-bostonember wrappers...........
  2. If you don't have bundler installed, do so now:

    gem install bundler
  3. Install the gems:

    bundle
  4. Build the database:

    rake db:create
    rake db:migrate
    rake db:seed
  5. Try accessing the Rails application from a browser:

    NOTE: The rails tests are not yet running; this will be followed up on shortly.

    rails s

    Then browse http://localhost:3000. You should get the standard Rails index page.

Test both together:

  1. Start Ember referencing Rails:

    ember server --proxy http://localhost:3000
  2. Browse http://localhost:4200. Browse around and notice that you have

    • Bugs Bunny w/ 2 presentations
    • Wile E. Coyote w/ 1 presenation
    • Yosemite same w/ 3 presenations

If you get further than we have, we would appreciate a PR from you, thanks!

Troubleshooting

This is currently running using ember-sc version 0.1.2. We try to keep it upgraded periodically to the latest-released ember-cli version.