Skip to content

Instantly share code, notes, and snippets.

@olivierlacan
Created May 19, 2013 18:00
Show Gist options
  • Save olivierlacan/5608432 to your computer and use it in GitHub Desktop.
Save olivierlacan/5608432 to your computer and use it in GitHub Desktop.
Rails 4 doesn't like Bundler's binstubs. This is what happens when you upgrade to Rails 4 RC1 with Bundler binstubs installed.
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
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
@olivierlacan
Copy link
Author

This change is problematic for me because I use @tylerhunt's technique to make environment variables accessible to anything that uses bundler.

@schneems recommended dotenv-rails as the solution he uses to manage environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment