-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Use absolute_path of caller_locations to infer engine root #17782
Conversation
According to documentation `path` only returns file names. On MRI it's not the case but it's likely a bug in MRI.
Use absolute_path of caller_locations to infer engine root
Use absolute_path of caller_locations to infer engine root
something is astray here, this commit breaks discourse, in particular seeing:
after, which is a simple Engine.
|
also .. why should Engine be exploding just cause it can not get a backtrace, seems rather extreme. |
This demos the issue:
absolute_path can be nil in some conditions ... so the code above should be:
|
Wouldn't |
Nope, run my example On Monday, December 1, 2014, Alexander Mankuta notifications@github.com
|
This seem to be a Ruby bug. According to documentation:
|
After discussing this with @ko1 I opened https://bugs.ruby-lang.org/issues/10561 feel free to leave your ideas / comments there @cheba |
@SamSaffron is there an ETA for 4.1.9? |
@SamSaffron also, might it make sense to do a bit of sanity checking here? rails/railties/lib/rails/engine.rb Line 360 in f2b1723
If the resulting path is |
@brixen next week, maybe in the Tuesday. |
@brixen @rafaelfranca agree here, we need to be a bit more protective. also in light of 10561 its possible for a frame to be nil (for injected c frames) we are probably unlikely to hit this in the real world but worth extra protection. |
@rafaelfranca are there still plans for a 4.1.9? People are having some issues updating to 4.2 and this bug is a pain for a bunch of applications on 4.1. |
@brixen sure. I was planing to start the release ritual yesterday but life got in the way. I'll try to do it today but Tuesday will be the deadline. |
The failing scenario was caused by a change in Rails that affects Rails.root when a Rails::Application is defined in symlinked file. rails/rails#17782 We've been set up Aruba workspace in each Cucumber scenario with symlinks, but this tends to behave differently from real files. Since the example_app project is not so large, we can simply clone it in each scenario.
The failing scenario was caused by a change in Rails that affects Rails.root when a Rails::Application is defined in symlinked file. rails/rails#17782 We've been set up Aruba workspace in each Cucumber scenario with symlinks, but this tends to behave differently from real files. Since the example_app project is not so large, we can simply clone it in each scenario.
The failing scenario was caused by a change in Rails that affects Rails.root when a Rails::Application is defined in symlinked file. rails/rails#17782 We've been set up Aruba workspace in each Cucumber scenario with symlinks, but this tends to behave differently from real files. Since the example_app project is not so large, we can simply clone it in each scenario.
@brixen just released the first release candidate including this bug fix. I believe next week we will have the final version |
@rafaelfranca many thanks. |
According to documentation
path
only returns file names. On MRI it's not the case but it's likely a bug in MRI. Rubinius tries to implement it according to documentation and Rails get broken on rbx (relevant discussion).Affected versions of Rails are
>= 4.1.0
. Would you like me to submit a PR for 4.1 branch, too?