mtmckenna / deploy-ember-with-rails

Deploy an Ember app via Capistrano while deploying a Rails app.
0 stars 2 forks source link

No route matches [GET] /javascripts/ and /stylesheets/ #1

Open kgish opened 9 years ago

kgish commented 9 years ago

I cannot get your demo to work. When I fire up the rails app and click on the ember link, I get a number of errors like this:

ActionController::RoutingError (No route matches [GET] "/javascripts/ember-app/vendor.js"):
...
ActionController::RoutingError (No route matches [GET] "/stylesheets/ember-app/vendor.css"):
...
ActionController::RoutingError (No route matches [GET] "/stylesheets/ember-app/ember-app.css"):
...
ActionController::RoutingError (No route matches [GET] "/javascripts/ember-app/ember-app.js"):
mtmckenna commented 9 years ago

Hello, @kgish ! It sounds like you might first need to build your Ember assets.

After cloning the project, here are the steps I had to do to get the app running:

  1. Run bundle from the root directory to download my Rails gems
  2. Run npm i && bower i from the ember-app directory to download my Ember dependencies
  3. In one terminal window, run rails s from the root directory to run the Rails server
  4. In another terminal window, run ember build --watch --environment=development from the ember-app directory to build/watch the Ember assets (I think this is the step you might be missing.)

After doing all the above, I can go to http://localhost:3000/ember-app and see the Ember app running.

Let me know if that helps at all!

kgish commented 9 years ago

Alright, got it working now. Thanks!

One final question though. I want to have the root pointing directly to the ember app rather than a separate ember-app link, how can I do that?

mtmckenna commented 9 years ago

Awesome! Glad it's working.

If you'd like the Ember app to be loaded from the Rails root path, you can update the Rails routes file (config/routes.rb) by replacing root 'welcome#show' with root 'ember_app#show'. That should do it!