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

前端 未结 3 1005
-上瘾入骨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 10:06

    About two years ago, a discussion happened in github about shared installs, which appears to answer the question.

    Synopsis: sstephenson (rbenv author) specifically doesn't like encouraging system-wide installs because of complexities with permissions, write access, etc. He believes adding robust support would make rbenv more complex, and simplicity is the goal.

    EDIT

    I've since come across fnichol's chef-rbenv cookbook, which, if you actually want to install a system-wide rbenv, gives a right and proper method, and you can automate it with Chef (I recommend knife solo).

    It installs this to /etc/profile.d/ so it will run for all users, putting the proper ruby into the PATH.

提交回复
热议问题