tricknotes / ember-cli-rails

Unify your EmberCLI and Rails Workflows
http://thoughtbot.github.io/ember-cli-rails/
MIT License
713 stars 205 forks source link

ember-welcome-page doesnt work with ember-cli-rails #495

Closed salmanasiddiqui closed 7 years ago

salmanasiddiqui commented 7 years ago

Which operating system and version is the project developed on? Ubuntu 16.04

Which version of ruby is the project developed on? 2.3.1

Which version of npm is the project developed on? 2.15.9

Which version of ember-cli is the project developed on? 2.8

What is the rails version? 5.0.0.1

What is the ember-cli-rails version (from Gemfile)? 0.8.1

What is the ember-cli-rails-addon version (from package.json)? 0.8.0

Is your application server multi-threaded (such as puma and unicorn) or is it multi-process (such as thin and webrick)? multi-threaded (puma)

What are the contents of config/initializers/ember.rb?

EmberCli.configure do |c|
  c.app :frontend
end

What are the contents of the Rails' view that renders the Ember application? Its rails 5 api app, there is no rails view.

How are the EmberCLI-related routes defined? mount_ember_app :frontend, to: '/'

How is the application deployed? Issue on my local env

I initialized ember project, run rails server and visited localhost:3000, a blank page was displayed. I visited localhost:3000/tests and that displayed a blank page aswell.

But if I run ember server within frontend directory and visit localhost:4200 a welcome page is displayed. And visiting localhost:4200/tests displays ember test results.

Does this mean that some ember addons might not work with ember-cli-rails?

nruth commented 7 years ago

I don't think so, because it looks like it's not an ember addon, nor part of your ember application. It doesn't seem reasonable for ember-cli-rails to support it, because it's a deployment solution more than a development server – which ember-cli provides already.

If you explore https://github.com/ember-cli/ember-welcome-page you won't find many files that aren't project boilerplate. The main one seems to be https://github.com/ember-cli/ember-welcome-page/blob/master/index.js and the commit history shows it used to be express js.

It looks like that page/addon is a simple webserver (think express.js or sinatra) rather than part of your ember app. It probably only works if you're running the ember s development server, and haven't started writing your app yet. ember-cli-rails is a deployment solution more than a development solution, so I wouldn't be surprised if this doesn't get supported.

A simpler way to think about it (if I got it right) is that it's an ember s addon, not an ember.js addon.

locks commented 7 years ago

v1 of ember-welcome-page is a middleware for the ember serve express.js server. For v2 we instead provide a component that is to be included in the default application.hbs blueprint, so this issue will be solved whenever Ember CLI bumps ember-welcome-page to v2.

seanpdoyle commented 7 years ago

According to https://github.com/thoughtbot/ember-cli-rails/issues/495#issuecomment-259057965, the issue is with the ember-welcome-page repository.

@salmanasiddiqui do you consider this issue resolved?

I'll close this issue for now. If you think it should be re-opened, please say so.