我正在尝试从Xcode cocoapods 插件pod 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 install
我没有问题。
需要注意的是,错误是指 Ruby 2.0.0,而当我ruby -v
从终端目录运行命令时,我得到(ruby 1.9.3p327 (2012-11-10 revision 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