If you're only using Rails (without Ember CLI), you could render the gon object in the application layout per gon's instructions and just pluck your data off of the gon global. Good place to do this might be your application route in Ember:
// routes/application.js
export default Ember.Route.extend({
model: function() {
return gon.myDataSet;
}
});
However, I would recommend using Ember CLI, which if you do, cuts your rails application layout (and thus gon) out of the equation. Instead, simply open up json endpoints on your rails application where you can then fetch it in your Ember application:
// routes/application.js
export default Ember.Route.extend({
model: function() {
return Ember.$.getJSON('/path/in/rails/app');
}
});
Then while you're in development run your rails server in one terminal, and then run your ember server (from the CLI directory) with the proxy option:
$ ember server --proxy http://localhost:3000
As for deploying, that's a whole can of worms, but check out ember-cli-deploy as it aims to be the one stop shop for deploying ember apps.