Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Created October 22, 2012 09:38
Show Gist options
  • Save ku1ik/3930651 to your computer and use it in GitHub Desktop.
Save ku1ik/3930651 to your computer and use it in GitHub Desktop.
You don't need bundle exec, rbenv-bundler and other bundler integration scripts

You don't need bundle exec, rbenv-bundler or other bundler integration scripts

You just need 2 things

Just prepend $PATH with .bundle/bin:

$ cat ~/.bashrc
...
export PATH=".bundle/bin:$PATH"
...

And set BUNDLE_BIN in global bundler config:

$ cat ~/.bundle/config
---
BUNDLE_BIN: .bundle/bin

Done.

If you're paranoid

If you're paranoid and you're afraid of adding "unsafe" dir to your $PATH:

$ cat ~/.bashrc
...
export PATH=".git/safe/../../.bundle/bin:$PATH"
...

Once for each project (after git clone, git init etc):

$ cd ~/code/project-x
$ mkdir .git/safe
@mostlyobvious
Copy link

How do you deal with tools like chruby that also prepend $PATH when switching rubies?

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