Skip to content

Instantly share code, notes, and snippets.

@michaldarda
Forked from ku1ik/gist:3930651
Created February 27, 2019 14:29
Show Gist options
  • Save michaldarda/b682ff24862ca7982231a4f1a7535f38 to your computer and use it in GitHub Desktop.
Save michaldarda/b682ff24862ca7982231a4f1a7535f38 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment