• Daniele Sluijters's avatar
    Fix some issues with the usage of RBENV_ROOT. · f4faa2e8
    Daniele Sluijters authored
    `RBENV_ROOT` can be used to relocate where rbenv ends up storing the shims
    and versions of Ruby it installs. Because of this split `RBENV_ROOT`
    cannot be used to reliably construct a path to the rbenv binary itself.
    
    Instead we now rely on `$RBENV_BIN_ROOT` pointing to the `bin/` directory
    containing the rbenv binary/script.
    
    If `$RBENV_BIN_ROOT` is not set we search `$PATH` first and then the
    user's home directory making sure to prepend the necessary directories to
    our `$PATH` depending on where we find rbenv.
    
    Lastly we prepend to our `$PATH` the location rbenv's `shims/` so that we
    can find the shims rbenv generates for us.
    f4faa2e8
rbenv.load 1.84 KB