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

前端 未结 3 1008
-上瘾入骨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:51

    rbenv should be installed at a user level.

    Unfortunately, this means that when running gem install, you may run into the problem you saw:

    You don't have write permissions into the {...} directory
    

    You can solve this by setting the correct permissions on the ~/.rbenv directory.

    sudo chown -R yourusername ~/.rbenv
    

    After chowning the directory, you'll be able to run gem install without sudo.

提交回复
热议问题