Closed williamweckl closed 8 years ago
Figured out that my frontend/tests/index.html
should call assets with ../
:
<script src="../testem.js" integrity=""></script>
Anyway, this file has been generated by the gem, could be fixed to generate as expected to work?
@williamweckl thanks for opening this issue.
Looking at the contents of your code snippets, a few things seem to be misconfigured, which might or might not be contributing to your problems.
include_ember_*_tags
and render_ember_app
helpers.We recommend that you use the render_ember_app
helper, as it renders the EmberCLI-generated index.html
file (a fully-formed and valid HTML document) into your Rails view.
Alternatively, the include_ember_script_tags
and include_ember_stylesheet_tags
helpers can be used to serve the EmberCLI-generated asset files from Rails, making them available from Rails views.
However, keep in mind that using the include
style helpers is deprecated, in favor of the render_ember_app
helper.
Whichever style of helper you pick, you should only use one style or the other.
mount_ember_app :frontend, to: "/frontend/", controller: "frontend"
get 'frontend/*' => 'frontend#index'
The mount_ember_app
helper already declares a get
route with a splat and an text/html
contraint, so you could probably omit your get
declaration.
this file has been generated by the gem
I think that file is generated by ember new
, not the gem.
I'm a bit surprised that the solution was to modify that file. I've never had to modify the tests/index.html
file for any Ember application.
I see that you're declaring a <base>
tag in your Rails view. Have you configured your Ember application to use /frontend
as the rootURL
?
I'm closing this due to inactivity.
@williamweckl if you're still experiencing this issue, please respond to https://github.com/thoughtbot/ember-cli-rails/issues/462#issuecomment-226784935 and we'll reopen it.
Which operating system and version is the project developed on? Ubuntu 16.04
Which version of [
ruby
][ruby] is the project developed on? 2.3.1Which version of [
npm
][npm] is the project developed on? 3.8.3Which version of [
ember-cli
][ember-cli] is the project developed on? 2.5.1What is the [
rails
][rails] version? 4.2.6What is the [
ember-cli-rails
][gem] version (fromGemfile
)? 0.7.4What is the [
ember-cli-rails-addon
][addon] version (frompackage.json
)? 0.7.0What are the contents of
config/initializers/ember.rb
?What are the contents of the Rails' view that renders the Ember application?
How are the EmberCLI-related routes defined?
Running
rake ember:test
from project root orember test
from/frontend
giving the below error:What am I missing?