我正在尝试从
Xcode cocoapods plugin运行pod安装命令.
当我运行update / install cocoapods命令我得到一个错误:
/usr/bin/gem install cocoapods ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
这是奇怪的,如果我去终端中的目录,并运行一个pod安装我没有问题.
要注意的是,错误是指Ruby 2.0.0,而当我从终端中的目录运行ruby -v命令时,我得到(ruby 1.9.3p327(2012-11-10修订版37606)[x86_64-darwin12. 4.0])
编辑 – 根据要求:
ls -la /Library/Ruby/Gems total 0 drwxr-xr-x 4 root wheel 136 27 Oct 23:39 . drwxr-xr-x 4 root wheel 136 27 Oct 23:36 .. drwxr-xr-x 6 root wheel 204 25 Aug 02:44 1.8 drwxr-xr-x 2 root wheel 68 25 Aug 04:13 2.0.0