cocoapods因GEM_HOME升级遇到问题解决办法
InstallingCocoaPodsonOSX10.11
TheseinstructionsweretestedonallbetasandthefinalreleaseofElCapitan.
CustomGEM_HOME
Thisisthesolutionwhenyouarereceivingthe"Operationnotpermitted"error.
$mkdir-p$HOME/Software/ruby
$exportGEM_HOME=$HOME/Software/ruby
$geminstallcocoapods
[...]
1geminstalled
$exportPATH=$PATH:$HOME/Software/ruby/bin
$pod--version
0.37.2
Standardsysteminstallation
Forwhateverreason,therootlessstuffseemslessrestrictivewhenonesimplyupgradesthesystem.Icouldsudogeminstallcocoapodsjustfineonamachineupgradedfrom10.10-however,binstubsarenolongerinstalledinto/usr/bin:
$sudogeminstallcocoapods
[...]
1geminstalled
$exportPATH=$PATH:/Library/Ruby/bin
$pod--version
0.37.2
Wehaveheardfromsomeusersthattheyreceivethiserrorwhendoingasystem-wideinstallation:
ERROR:Whileexecutinggem...(Errno::EPERM)
Operationnotpermitted-/usr/bin/pod
Wearen'tsurewhygembehavesdifferentlyonsomesystems,butthiscanbesolvedbypassing-n/usr/local/bintotheinstallcommand,sothatthepodexecutablegetsinstalledthere.
Note:I'velockedtheissuetocollaboratorssothattheseinstructionsdon'tgetburiedfornow.