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:
- Ruby (version 1.9.3 or higher)
- RVM
- Node
- Npm
Installation Steps
-
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:
-
Go into the
embersc
directory to set up the client system:cd embersc
-
Install everything:
npm install bower install
-
Run regression tests
ember server
Then browse http://localhost:4200/tests and watch them run.
Rails:
-
Go into the
rails
directory to set uprvm
: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...........
-
If you don't have
bundler
installed, do so now:gem install bundler
-
Install the gems:
bundle
-
Build the database:
rake db:create rake db:migrate rake db:seed
-
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:
-
Start Ember referencing Rails:
ember server --proxy http://localhost:3000
-
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.