Closed ndbroadbent closed 7 years ago
Ah I see, I need to also set the rootURL
in frontend/config/environment.js
. That's mentioned later on in the README, but I think it would be helpful to mention that in the Mount
section under Routing options
. I will submit a pull request.
Which operating system and version is the project developed on?
Mac OS X 10.11.6 (15G1108)
Which version of [
ruby
][ruby] is the project developed on?2.2.3p173
Which version of [
npm
][npm] is the project developed on?4.0.2
Which version of [
ember-cli
][ember-cli] is the project developed on?ember-cli: 2.9.1 node: 4.4.4 os: darwin x64
What is the [
rails
][rails] version?5.0.0.1
What is the [
ember-cli-rails
][gem] version (fromGemfile
)?0.8.3
What is the [
ember-cli-rails-addon
][addon] version (frompackage.json
)?0.8.0
Is your application server [multi-threaded][] (such as
puma
andunicorn
) or is it multi-process (such as thin and webrick)?puma (3.6.2)
What are the contents of
config/initializers/ember.rb
?What are the contents of the Rails' view that renders the Ember application?
I am just rendering the default index from
EmberCli::EmberController
:How are the EmberCLI-related routes defined?
config/routes.rb
:How is the application deployed?
Developing locally
I'm trying to get up and running with
ember-cli-rails
, but I'm running into a problem whenever I set a custom path inmount_ember_app
in myroutes.rb
. Everything works fine when it is mounted at/
. However, we want to use/
for a landing page, and then show the ember app to authenticated users at/app
.When I visit
/app
, the HTML loads correctly, but my Rails server displays a whole bunch ofNo route matches ...
errors:ActionController::RoutingError (No route matches [GET] "/assets/vendor.css")
ActionController::RoutingError (No route matches [GET] "/assets/frontend.css")
ActionController::RoutingError (No route matches [GET] "/assets/frontend.js")
ActionController::RoutingError (No route matches [GET] "/assets/vendor.js")
However, the assets show up if I visit paths such as
/app/assets/frontend.js
and/app/assets/frontend.css
in my browser.Is this the expected behaviour? Do I need to customize the index view and change these paths manually?
Thanks!