Rails 4 has moved its rails
command to the bin
directory of the application, but this collides with any existing rails
command put there by the --binstubs
flag, and the two are not compatible.
The recommended way to use binstubs with Bundler and Rails 4 is to not use the global --binstubs
flag, but to call bundle binstubs [gemname]
individually on gems you want in your local bin folder. For some background on these changes, check out these commit comment threads: rails bundler.
There was an attempt to make Bundler 1.3.x not override anything in the bin directory if --binstubs
was in effect, but that change was reverted for semantic versioning. My understanding is this change will be re-attempted in Bundler 2.x.