Ember-CLI or ember-rails for and Ember app in a rails web app?


#1

I see that the ember-cli community is very active. Also, I see that the ember-rails gem is still fairly active in terms of commits.

I was wondering, which one of the two is the recommended way of using EmberJS with Rails?


Use Gem Ember Rails or run Ember separately
#2

I started with ember-rails but felt as if the community was moving towards ember-cli so I switched. It still feels like the right decision so far.


#3

I see. I’m leaning towards the same direction.

However, it would be beneficial to know what the creators of Ember are suggesting.

Are Ember and ember-rails going to always be maintained independent of ember-cli. Is ember-cli going to just be a tool to help with rapid ember development, or is it going to eventually become the de-facto way of using EmberJS.

Amarish


#4

ember-cli is already the de-facto standard and will continue to be for the foreseeable future. Using the ember-rails gem is a pretty big step backwards. You’ll miss out on modules, fast reloads, generators, a ready-to-go testing setup, and a whole lot more. You can read Tom Dale’s comments about it here: https://github.com/emberjs/rfcs/pull/15

If you’re doing a greenfield Ember app without any server rendered stuff I would recommend just creating an ember-cli app that is completely separate from Rails (you can keep them in the same repo if you want). You can symlink ember-cli’s output in /dist into your rails public folder while developing and build the files there when deploying.

You should also checkout the ember-cli-rails gem which provides a good setup and has configuration options set correctly for development and deployment with Rails:


#5

Also https://github.com/LevelbossMike/ember-deploy for another more loosely coupled way of deploying ember cli with rails.


#6

I strongly advocate ember-cli for the frontend and rails as the API layer, separately. Having said that, if I don’t really need full rails, I look towards something more lightweight.


#7

I am currently moving from ember-rails to ember-cli. it is kind of a bitch, but I think it is the right move.


#8

We have a blog post up on our blog that will be a little helpful here, Ember CLI, Rails and Circle CI. It’s a higher level explanation of how to get Circle CI set up, but it links to a sample app on Github in the first paragraph that shows how we set up all of our Ember CLI and Rails projects. You can also see some more of our projects at https://github.com/greenfieldhq.

Our pattern is Ember CLI within a front end folder and rails in a backend folder within the same repo. We then proxy requests to Rails documented within ember server section at http://www.ember-cli.com/#using-ember-cli


#9

Update on ember-deploy

This looks like it’s going to be getting some more attention. @lukemelia is doing a talk on this at the upcoming ember conference. http://emberconf.com/speakers.html

Also there were two separate repos that just got merged into https://github.com/ember-cli/ember-cli-deploy