Build for Rails (using Ember-CLI / EmberAppKit)


I’m using Ember-CLI to build an Ember app, interacting with a Rails API.

The Ember app will be packaged into PhoneGap (the main reason I am building outside of Rails), which works fine.

I would also like to use the application for my mobile site – which needs to run off of a Rails server. I was thinking of a Grunt task to build for Rails, to send the /dist folder to my Rails repo.

Has anyone done anything similar to this?


I used this Rakefile gist to do something similar earlier today. The task runs ember build and copies the necessary layout/js/css files to the Rails asset pipeline.

It’s pretty basic (only copies the single js/css files, not any other assets like images/fonts/etc.) but is probably a good jumping-off point.


Notes taken from rwjblue:

  • single repo with a ‘backend’ folder and a ‘frontend’ folder
  • use this rake task to start everything properly
  • deployment depends on the app. It is as simple as copying the ember-cli dist/ dir into public/assets on rails if that is what you want

Joe Fiorini on Ember CLI


Here is another link to Joe Fiorini on Ember CLI the above one seems to be dead, will be interested to hear how the phonegap/cordova integration goes, I’m looking to do the same with the setup listed above in the not too distant future…


Also @nick there is a good blog series that Brian Cardella is writing from Dockyard Building an Ember App with Rails that I have been following along to get basic setup down, looks like its essentially the explanation of the above rake task / 2 seperate folder setup… hope it helps :slight_smile:


Another helpful ember-cli-rails tool via Jason Madsen:

Ember-cli-rails gem

I spent a good deal of time migrating my ember/rails app away from using the asset pipeline to ember-cli with a proxy for the rails api. For development I am finding it to be much faster iterating while building new features.


How do you find development of CSS especially those involving images and with fingerprinting. In Rails, the CSS will be in ERB template and using the asset_path, I am curious how you solve that issue.