On a clean Rails 4 install with Bundler 1.3.0, using --binstubs causes competition between Rails and Bundler for the contents of bin/rails (and bin/rake).
Just running bundle will rewrite the Rails version of bin/rails to a version that doesn't work.
The fix is to use the new bundle binstubs <gemname> command.
(see rails/rails#8974)
Don't do
--binstubs, usebundle binstubs <gem>for the ones you want. After you generate a project, you'll have three things there:bin/rails sshould work right away.If you add a gem that you want an executable for....
and you bundle, it's the same:
So you use binstubs:
Now you commit the
Gemfileand yourbin/directory.