Search code examples
rubybundlergemfile

What does bundle install --binstubs serve for us?


When do you execute the following command? Also, do you explain what it gives for us?

$ bundle install --binstubs

Solution

  • From bundle install --help man page

    --binstubs[=<directory>]
                  Creates a directory (defaults to ~/bin) and place any executables from the gem there. These executables run in Bundler's context. If used, you might add this directory to your
                  environment's PATH variable. For instance, if the rails gem comes with a rails executable, this flag will create a bin/rails executable that ensures that all  referred  depen-
                  dencies will be resolved using the bundled gems.