Should rbenv be installed system-wide, or at a user level?

前端 未结 3 1049
-上瘾入骨i
-上瘾入骨i 2021-02-07 09:37

I\'m building a vagrant setup, and part of that is installing rbenv. I\'m using librarian-chef to manage all my chef cookbooks, and it installs rbenv and ruby-build.

How

3条回答
  •  面向向阳花
    2021-02-07 09:47

    Everything in rbenv's Readme is assume a local (per-user) installation in ~/.rbenv/ so i would assume that the official recommendation is to install it on a per-user basis.

    Still, it's possible to install it globally. But you'll need sudo for all commands that need to writing rights. Installing new rubies, installing gems* and changing the global ruby version are the ones coming to my mind here, there might be more.

    (*) Needing sudo for installing new gems is the default when you install your ruby through the default system routines like apt on debian, not needing sudo for it is actually a positive side effect of using ruby version managers that work on a per-user basis

提交回复
热议问题