Search code examples
rubyrbenv

How can I change the path that "rbenv init" uses?


I'm trying to install rbenv and then run rbenv install -v 2.3.1 to install the corresponding Ruby version.

However the quota in my home folder is really low and I can't use it currently as the admin doesn't allow it. By default when I execute eval "$(rbenv init -)" it creates the .rbenv in my home folder.

Is there any way to create it in /opt or anywhere else?


Solution

  • Have you trying setting RBENV_ROOT as documented in the rbenv README?

    export RBENV_ROOT=/opt/rbenv
    eval "$(rbenv init -)"