-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmberCLI failed to generate an index.html
file.
#380
Comments
@movstox thanks for opening this issue and bringing it to our attention. Have you followed along with the Setup Instructions, particularly: $ cd path/to/frontend
$ ember install ember-cli-rails-addon If so, what version of the addon are you running? Have you followed all the steps in the Heroku section? |
@seanpdoyle I'm running "ember-cli-rails-addon": "0.7.0" as well. I've upgraded from 0.5.8 and when I start When I deploy to Heroku - it doesn't, is there a way to find out why Here is more info: rails configEmberCLI.configure do |c|
c.app :account, path: Rails.root.join('account').to_s
c.app :admin, path: Rails.root.join('admin').to_s
end routes.rbmount_ember_app :account, to: '/account', controller: 'account', action: 'index', as: :account
mount_ember_app :admin, to: '/admin', controller: 'admin', action: 'index', as: :admin custom controllerclass AccountController < EmberCli::EmberController
before_filter :authenticate_user!
end ember-cli-build/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
fingerprint: {
prepend: '/account/'
},
sassOptions: {
includePaths: ['bower_components/materialize/sass']
}
// Add options here
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
return app.toTree();
}; environment.js/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'account',
environment: environment,
baseURL: '/account/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
},
};
.... |
Also, I had to modify
|
What is the output of
Also, for what it's worth, your changes to |
The error message you're seeing is somewhat vague because, in theory, it should never be reached. That is to say, if your project is properly configured and there are issues with compiling your Ember application, they would be raised elsewhere (for instance, in the call to This leads me to believe that your application is never invoking the |
Does this help?
|
@movstox yup, looks like you're properly configured there. What about the output of $ heroku config | grep SKIP_EMBER And what environment are you running in? $ heroku config | grep ENV |
@seanpdoyle it's empty! |
The output of What environment are you running in? $ heroku config | grep ENV |
|
Hmm, this is a real head scratcher. Would you mind trying to compare your application to https://github.com/seanpdoyle/ember-cli-rails-heroku-example, being on the lookout for configuration differences? That repo demonstrates how to serve an application from multiple routes (similar to yours but there's only a single Ember codebase -- shouldn't really affect the configuration though) |
Ok, this would take me some time. |
Also, does it make sense to run |
That's a great idea! |
@seanpdoyle Finnally, changed the deployment strategy to the one based on Redis(index.html) / S3(assets). I suppose in this case I don't need |
@movstox have you been using the Redis deployment strategy from the start? |
@seanpdoyle no, but I was not able to find the explanation for my issue. Perhaps, it's about Heroku, since my app worked on DigitalOcean and locally. S3/Redis was already available so I've just opted for that. |
@movstox are you using https://github.com/seanpdoyle/ember-cli-rails-deploy-redis? |
@seanpdoyle yes. The only thing I would like it to be able to do is allowing to setup the namespace via env var (i.e. 'appname:index'). Otherwise, looks like it works pretty well. |
@movstox that's great!
I agree, that would be a great feature. PRs are welcome! I'm also currently working on a project that uses that strategy so be on the lookout for coming improvements. Closing this issue for now. |
@seanpdoyle thanks for your input and good luck. |
hey there! i'm getting this same error, and heroku config | grep SKIP_EMBER --> is empty heroku buildpacks:
|
update: i was precompiling my assets and apparently should've been letting heroku do that. thanks @drapergeek !!! |
I'm seeing this same issue after upgrading from 0.5.7 to 0.7.2. ember.rb
routes.rb
app/views/ember_cli/ember/index.html.slim
ember-cli-build.js
environment.js
heroku
Everything builds fine locally. The issue is only present on Heroku. Is it possible some previous config from 0.5.x is short circuiting everything? |
I used redis based setup finally. On 02.03.2016 at 18:33 GMT Ryan Linton wrote:
|
@ryanlntn thanks for providing all that extra context. mount_ember_app :frontend, to: '/*path' The dynamic segment glob can be omitted: mount_ember_app :frontend, to: '/'
The current implementation of the Rake task will only output on errors. Additionally, given the way dynos work, I don't think compiling the frontend after the fact will persist the EmberCLI generated files to the file system. Does your deploy invoke |
@seanpdoyle It is being invoked:
|
@ryanlntn what are your
|
|
@ryanlntn just to clarify -- you've followed all the steps for setting up Heroku, including running the generators and executing: $ heroku config:set NPM_CONFIG_PRODUCTION=false and you're still seeing the following?
@tute since we've just recently worked through a similar issue, do you have any guess as to what's causing this? |
@seanpdoyle Yeah. I've followed all the Heroku setup steps in the readme and I'm seeing that error. |
The problem I had was that my |
@ryanlntn could you try running: $ rm -rf frontend/{tmp,dist} tmp/ember-cli
$ RAILS_ENV=production bundle exec rake assets:precompile
$ cat tmp/ember-cli/apps/frontend/index.html |
@ryancoughlin what version of node are you using? |
@seanpdoyle This is the output that gives me:
@tute I'm running |
I saw several questions with same error message (but regarding to Heroku) but I could not fix mine. I built a docker container image, but the ember app can not be displayed:
Inside container there is a Here is my configuration: # config/routes.rb
mount_ember_app :frontend, to: '/app'
# config/initializers/ember.rb
EmberCli.configure do |c|
c.app :frontend
end // frontend/config/environment.js
module.exports = function (environment) {
var ENV = {
modulePrefix: 'frontend',
environment: environment,
baseURL: '/app',
locationType: 'auto',
EmberENV: {
FEATURES: {
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
host: 'http://localhost:3000',
app_fixtures: {
display_name: 'John Doe',
first_name: 'John',
last_name: 'Doe'
}
}
};
if (environment === 'development') {
}
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
}
if (environment === 'production') {
}
return ENV;
}; I have My docker container is built by:
@seanpdoyle any idea? Also, in my config.serve_static_files = true |
After debugging I noticed that gem is trying to load This lead me to think about compilation of assets - then I saw that there is no ember-cli installed so I added
just after
I rebuilt image and it is working. However, environment is still
Now everything is up and running. Basically, the problem was that If the error was saying |
@bajalovic thanks for getting to the bottom of this!
A fix has been merged into |
hi all, is there a way i can debug this? Getting error on Heroku, locally the app is running just fine (DigitalOcean).
Many thanks.
Trace:
The text was updated successfully, but these errors were encountered: