There are no files selected for viewing
4 comments
on commit 9039c50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can somebody point me to a technical reason why bin/rails doesn't work if generated by Bundler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mislav it's due to the way rails behavior changes depending on whether you're inside a Rails app or outside it.
If you're inside an app, we exec bin/rails and let it handle the in-app rails commands. If you're outside an app, we provide the rails new command to generate apps.
When Bundler overwrites bin/rails with a gem stub, execing the stub will exec the rails executable in the Rails gem. But the rails executable is what just execed bin/rails! Boom.
The major change here is that Rails 4 is treating bin/ as part of your app's source code. This philosophy is at odds with Bundler, which treats bin/ as an ephemeral directory whose contents can be overwritten. Future Bundler (probably 2.0 due to semver constraints) will prompt rather than overwrite and, hopefully, won't treat --binstubs as a sticky option.
is
strip_heredocappropriate here?