Skip to content

Instantly share code, notes, and snippets.

@oojikoo-gist
Last active January 19, 2016 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oojikoo-gist/f2cf78abb0c3f1d9eda8 to your computer and use it in GitHub Desktop.
Save oojikoo-gist/f2cf78abb0c3f1d9eda8 to your computer and use it in GitHub Desktop.
rails: rails 4 binstub upgrade

In Rails 4, your app's bin/ directory contains executables that are versioned like any other source code, rather than stubs that are generated on demand.

Here's how to upgrade:

  bundle config --delete bin    # Turn off Bundler's stub generator
  rake rails:update:bin         # Use the new Rails 4 executables
  git add bin                   # Add bin/ to source control

You may need to remove bin/ from your .gitignore as well.

When you install a gem whose executable you want to use in your app, generate it and add it to source control:

  bundle binstubs some-gem-name
  git add bin/new-executable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment