-
-
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
No such file or directory @ rb_sysopen - /Users/collins/git/<app>/tmp/ember-cli-<uuid>/apps/frontend/index.html #331
Comments
@patcoll thanks for bringing this to our attention! Would you mind trying out #327, following these instructions? |
Is building necessary if I've performed |
Yep, I found the |
@patcoll currently, it's only a ember-cli-rails/lib/ember_cli/app.rb Lines 42 to 48 in b54abab
|
I still get this error in some cases if I come back to my computer after a bit, with my development server running, still using the The
|
@patcoll are you using puma or unicorn? https://github.com/thoughtbot/ember-cli-rails#serving-from-multi-process-servers-in-development |
Yep I've been down that road and solved that already. Using puma with 1 worker process and 16 threads. Equivalent of |
@patcoll can you still reproduce the erratic error with |
I'll try that setting this week and see if it happens again! |
@seanpdoyle If I use I'll continue to monitor this week to see if the intermittent version of this error re-occurs. [edit: mark code in markdown] |
@patcoll would you mind trying out:
Each of those branches has up-to-date README's. |
Using those seem to work -- all my smoke tests pass as before, and my quick manual check was good too. The paths changed for some assets. The paths changed from having a prefix of Some questions:
Now this was not a problem for CSS and JS, since |
@patcoll checkout the second commit of https://github.com/seanpdoyle/ember-cli-rails-heroku-example/tree/remove-sprockets It adds support for a second Ember app mounted elsewhere |
I like the coincidence that the paths line up with your sample app when developing locally for |
What is the difference in behavior between two URLs that are different, but are both served properly? |
The behavior I'm looking for can be accomplished by simply adding a leading slash to paths in the I changed:
To this:
Similarly for my new Then I can use the same exact value for the |
I still rarely (intermittently, again) get a similar error to the original one reported here, while using the remove-sprockets stuff. I put it in a gist here: https://gist.github.com/patcoll/c3aa88e69a191fbb7721 (easiest solution is to download ZIP and drag into a browser). I need a custom controller, so the current workaround that seems to work is this:
Again, with PUMA and 1 worker and 1 thread locally. Inheriting from |
@patcoll Also, 2b26309 was merged as well, which removes the burden of invoking Also, if you have a single EmberCLI application, and the only thing you're altering is the view, you can avoid routing to your custom controller and override the view. |
Yes, I understood the outcome that you desired, but what is the difference in behavior? URLs both with and without the leading slash are served properly. Supporting the former would require additional work, supporting the latter works out of the box. EmberCLI's generated This gem has no business altering asset URLs in that generated |
FWIW, even with |
Hmm. Are you sure you're on that commit of the addon? NPM can be very finnicky. I'm not sure how to proceed with this. Would you feel comfortable granting me temporary access to the problem repository? |
Behavior with relative asset URLs in well-behaved browsers seems identical. I fear incompatibility with poor browser implementations of the HTML5 History API (a misbehaving browser could misinterpret a request for One discrepancy that could occur is with upcoming server-side rendering of Ember routes in future Ember versions. In that case, the asset URLs would not match up with the URL of the requested resource, which could cause confusion. I'm grasping at straws here though :) I foresee problems, but I can't necessarily enumerate any solid cases right now. I'm very biased, but I've always felt using absolute URLs for linking to CSS and JS from HTML was best practice. I totally concede the point that current behavior is as expected. I appreciate you debating with me about this and the errors I've encountered, and about all the work you've obviously been putting into maintaining this awesome library. Hats off to you. |
I have a script I use to remove all NPM and Bower libs, clear both NPM and Bower caches, then re-install all libs. I ran my server again and the first time the page loads, I still get the error. |
@patcoll I have some concerns about as well, but given the fact that we're encouraging users to use the
In production systems, most EmberCLI applications will set the |
The fact that we can't get this to work is disconcerting. Have you tried using the second commit of https://github.com/seanpdoyle/ember-cli-rails-heroku-example/tree/remove-sprockets as a reference? |
Also FWIW, I never seem to run into the issue in a |
@patcoll are you on ScreenHero? I'm seandoyle at thoughtbot.com if you'd like to try devoting 3 minutes to air pair through this |
I've definitely used that as a reference, indeed, as we've been debating the finer points of relative asset URLs and fingerprinting ;) Are you talking about seanpdoyle/ember-cli-rails-heroku-example@65b3fd2? FWIW the I'll ping you on ScreenHero in a minute here. |
Checks to see if index.html file exists for each app before declaring the build complete. Fixes thoughtbot#331.
I was able to avoid this error by ensuring the index.html file exists before the build is declared done. See referenced pull request.. |
Closes [#331]. Closes [#349]. According to the [addon hook documentation][hooks]: `#postBuild` > Gives access to the result of the tree, and the location of the output. `#outputReady` > Hook called after the build has been processed and the files have been > copied to the output directory Since we're now blocking until the `index.html` it built and in the output directory, `outputReady` is the behavior we depend on. [hooks]: https://github.com/ember-cli/ember-cli/blob/082d559757b3d6d186fc1c3cd1b7c2bb1ad10b3f/ADDON_HOOKS.md#outputready [#331]: thoughtbot/ember-cli-rails#331 [#349]: thoughtbot/ember-cli-rails#349
@patcoll would you mind using this branch of the addon: rondale-sc/ember-cli-rails-addon#27 I'm very hopeful this will resolve the race condition |
I am getting this error on startup in development environment, in cases where the first request to Rails is not one for my mounted Ember app.
When this happens I must restart my local development server and make sure the first request is to
/
, where my app is mounted, so it can trigger ember-cli-rails.I have a series of endpoints mounted under
/api
separate from any Ember app, so I've been using those endpoints to test.Steps I take to reproduce:
ember-cli-rails
version 0.5.8curl -s http://localhost:8123/api/assets
The text was updated successfully, but these errors were encountered: