-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Deploying to Heroku fails #80
Comments
Took a cue from the stack trace including manifest.rb, and included this in my Brocfile.js:
But no dice :( |
I should note, I am deploying to a staging Heroku environment. So I tried to ensure that the asset-rev always runs with this:
But still nothing. |
First off, Ember fingerprinting and generateRailsManifest SHOULD both be disabled. Second, what version of the EmberCLI Rails are you using? Third, is there a reason you're using the version of Rails that was released more than a year ago and received eleven bugfix releases since then? |
Assuming you're using the latest version of ember-cli-rails, is there a chance you could build a minimal showcase app to demonstrate the error? |
Also, what happens when you run |
Where is it documented that 'Ember fingerprinting and generateRailsManifest SHOULD both be disabled.'? This seems to be a vital piece of information and there's nothing covering it. I'm using Ember-CLI 0.1.12. Yes, there's a very good reason. I have no control over it. Unfortunately I don't live in a magical greenfield consulting land where I can enjoy everything new, all the time. |
😿 Cheer up, there's nothing that should be preventing the gem from working properly on Rails 4.0.2. It's a bug and we'll try to fix it, so it's gonna be all good. |
Rails manifest is disabled by default and our magical addon takes care of disabling the fingerprinting. The idea behind the gem was that the integration should be as seamless as possible and the whole experience should be very Rails-like. The assumption is that it should work with default settings, which it kind of does. If you're messing with deployment-related options, you must be knowing what you're doing better than we do. |
Ultimately it was nothing to do with Sprockets. Because of this nonsense (https://github.com/rwz/ember-cli-rails/blob/master/lib/ember-cli/app.rb#L18) an exception that was being thrown by Ember-CLI was being completely swallowed when deploying on Heroku. Don't swallow output, please. |
@johnmcdowall Getting this same error - would you mind sharing how you resolved it? |
I'm getting this as well, Rails 4.1.9, ember-cli-rails 0.1.11, ember-cli 0.2.0 –– would be curious to hear how you fixed or debugged. |
I think there is a solution on #112 --> but I haven't had a chance to validate yet. — Nathaniel Watts On Sat, Mar 14, 2015 at 5:41 PM, Gordon B. Isnor notifications@github.com
|
For me, there was an exception being thrown elsewhere because of a missing asset file, that at the time was being swallowed by ember-cli-rails: |
@johnmcdowall how were you eventually able to track that down? |
This issue was fixed in 0.1.0 in this commit 2b4637b. Build errors raise an error now. |
@tigershen23 you could track down the build error by running it manually locally. It's no longer an issue since EmberCLI build error will produce a Ruby. |
@rwz awesome, thanks! |
@rwz any reason why the ember build could succeed but not make it all the way through to the view render on heroku as in #112? I've got it working with @seanpdoyle's instructions, so I'm willing to chalk this up as user error if it seems that way to you. |
What was the issue? What exactly failed? |
@rwz I've rolled it back to the broken state: https://tiger-fuego.herokuapp.com/. Repo at that SHA was here. As you can see, the CSS classes/id's aren't being injected and the HTML content isn't coming through from ember even though the build succeeded (log can be found in #112). As I said, I eventually got it working, so not a show-stopper. Just passing it along. |
As per @seanpdoyle's repo, changing this line in package.json from README
to this worked for me:
|
|
@tigershen23 your |
@rwz should the README clarify that the path is something individuals will need to figure out for themselves? I folllowed the README verbatim and it did not for me, so could this potentially be a point of confusion for others as well? |
@gordonbisnor probably. The point is, there should be be bower on the deploying stage and it should run before assets:precompile. |
@rwz I just got to this issue after a few hours of trying to blaming sprockets or failed builds or missing assets. I have a multi-app project and forgot to add the "postinstall" hook to my newest ember app before deploy. It would be great to add a warning or reminder about "postinstall" if this was omitted during a deploy. For me, the problem (of course) was that |
Big +1 for skylar comment, it took me ages to see that my postinstall hook was missing (was probably overriden while I updated my Ember-cli version). |
@Leooo at this point, we should probably make that a new issue/ask... |
@skylar @Leooo on personal / client projects, I've moved away from direct Heroku deploys and towards using the Lightning Fast deploy approach. I have a standing PR #172 to integrate the Redis-backed approach to ember-cli-rails. It might not make sense to integrate that with this gem. If that's the case, I'll cut a separate gem for it. TL;DR my suggestion is to look into alternatives, unless @rwz or @rondale-sc have had success stories they can share. |
@seanpdoyle I'd agree that another approach is ideal for most deploys, but right now it's an issue of migration or scale. If you have a new project you'll likely invest time in something more explicit for deploys. I've seen this project as a helpful stepping stone for pre-embercli projects, or small experiments that want a quick no-hassle heroku-push-deploy. My thought on your PR is that it looks mostly independent of ember-cli-rails so it would be easiest to consider/review as it's own gem. If you do roll that up, ping me and I'll review it as standalone. thx! |
Rails: 4.0.2
Package.json:
Everything works locally during development, but deploying to Heroku fails with:
I am building the Ember applications styles from the ember-cli
styles
directory using SASS.Any ideas?
The text was updated successfully, but these errors were encountered: