installing gems using rvm

前端 未结 5 1123
长情又很酷
长情又很酷 2020-12-28 17:16

When trying to install gems using rvm i get this error

$ rvm gem install sproutcore
ERROR:  While executing gem ... (Errno::EACCES)
Permission denied - /home         


        
相关标签:
5条回答
  • 2020-12-28 17:28

    its probably not the correct way of doing things but I found that using rvmsudo resolved the issue, eg

    rvmsudo gem install rails

    0 讨论(0)
  • 2020-12-28 17:29

    I was having the same problem. I redid this command

    user$ source ~/.rvm/scripts/rvm

    from a new terminal window (as suggested when installing rvm and possibly overlooked when I was installing rvm) and things seemed to be fine after that

    0 讨论(0)
  • 2020-12-28 17:31

    There's a permission issue with your .gem folder. Make sure the owner is your current user.

    sudo chown -R tee /home/tee/.gem
    

    If it doesn't work, remove the .gem folder. It is automatically created when you update the gem cache.

    Also, make sure you never used sudo with rvm.

    0 讨论(0)
  • 2020-12-28 17:35

    I was having the same problem because the RVM was installed globally, in /usr/local/rvm , so it had no permission to install gems in ruby directory.

    The workaround is to use Single User Installation, this will install your rvm in your user's home directtory(~/.rvm) so it will have all necessary permissions to install the gemsets and gems.

    If you want to know the subject better read https://rvm.io/rvm/install . You will see that Single User Install is the recommended .

    0 讨论(0)
  • 2020-12-28 17:40

    http://rvm.io/set/gem/

    or just

    $ rvm <ruby_version>
    $ gem install sproutcode
    

    This should definitely work.

    0 讨论(0)
提交回复
热议问题