DEV Community

Cover image for Never run `bundle exec` or use `bin/` again with these two easy steps
Matt Culpepper
Matt Culpepper

Posted on • Updated on

Never run `bundle exec` or use `bin/` again with these two easy steps

Step one:

Add PATH=".git/safe/../../bin:$PATH" to your PATH

If you're using bash or zsh:

echo 'PATH=".git/safe/../../bin:$PATH"' >> ~/.$0rc
Enter fullscreen mode Exit fullscreen mode

If you're using fish,

fish_add_path -p ".git/safe/../../bin"
Enter fullscreen mode Exit fullscreen mode

Step two:

In your Ruby project directory, and any subsequent Ruby project directories, run mkdir .git/safe.

Image description

Voila! Props to @thorncp for telling me about this and props to the legendary Tim Pope for coming up with it (I believe)

Top comments (0)