Yes, totally possible.
You will need a Rails route for each app. eg /app1 and /app2
I have a separate javascript manifest file for my ember app and for my Rails app, but I don't see why you can't combine both ember apps into application.js manifest file if you want to.
You can instantiate your Ember app as follows:
App = Ember.Application.create({
rootElement: '#PUT_YOUR_ROOT_DOM_ELEMENT_HERE',
Resolver: Ember.DefaultResolver.extend({
resolveTemplate: function(parsedName) {
parsedName.fullNameWithoutType = "PUT_THE_RELATIVE_RAILS_URL_FOR_YOR_EMBER_APP_HERE/" + parsedName.fullNameWithoutType;
return this._super(parsedName);
}
})
});
Embers default behaviour is to attach to the bottom of the DOM, You can specify a rootElement as shown above.. Useful if you re-use header or footer from Rails app. Solution above shows how you specify your Rails url for the ember app, so that Ember urls are relative to it.
I got this solution from here:
Ember-Rails and namespaced templates
UPDATE:
You should also specify the relative Rails url in the Router
App.Router.reopen({
rootURL: '/PUT_THE_RELATIVE_RAILS_URL_FOR_YOR_EMBER_APP_HERE'
});