thoughtbot/dotfiles — pull request #215 by croaky (2014-01-23 07:18:53+00:00)
Title: Load rbenv and add trusted binstubs to PATH

Our expected way of managing Rubies is with rbenv:

https://github.com/thoughtbot/laptop/blob/master/common-components/ruby-environment

This commit loads rbenv in `zshrc` as recommended by the rbenv docs:

https://github.com/sstephenson/rbenv#basic-github-checkout

Assuming the binstubs for a project are in the local bin/ directory, we can
even go a step further to add the directory to shell $PATH so that rspec can
be invoked without the bin/ prefix:

export PATH="./bin:$PATH"

Doing so on a system that other people have write access to (such as a shared
host) is a security risk:

https://github.com/sstephenson/rbenv/issues/309

The `.git/safe` convention addresses the security problem:

https://twitter.com/tpope/status/165631968996900865