Home  >  Q&A  >  body text

ruby-on-rails - 在安装RubyOnRails的时候出现问题

我的Ruby是有的gem也是有的但是运行‘gem install ralis’就出现这个问题You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

怪我咯怪我咯2710 days ago629

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-24 09:15:44

    Because the current user of your system does not have write permissions to the /Library/Ruby/Gems/2.0.0 directory. You can use sudo gem install rails to gain root permissions to operate. However, this is not recommended. The Ruby you are using now is the Ruby that comes with the system. This is not conducive to upgrading and switching Ruby versions in the future, and it is not very convenient to manage gems. It is recommended that you use a Ruby version management tool such as rvm or rbenv to install and manage your Ruby.

    The specific choice of rvm or rbenv depends on your personal preference. I use rvm.

    Rvm Practical Guide

    rbenv Practical Guide

    reply
    0
  • Cancelreply