这是简短的版本:
我跑的时候
pod install 
在我得到的Xcode项目中
[!] Pod :: Executable pull error:无法打开.git/FETCH_HEAD:权限被拒绝
如果我跑
sudo pod install
我没有得到任何错误,但是我安装的文件是root所有并且无法编译,我必须将chown这些文件发送给普通用户才能使用Xcode编译器.
我正在运行Lion OSX.
我使用安装了cocoaPods
sudo gem install cocoaPods
我不得不使用sudo因为没有它我得到了
错误:执行gem时...(Gem :: FilePermissionError)
您没有写入/Library/Ruby/Gems/1.8目录的权限.
所以现在我有一个root安装版本的cocoaPods下载了root拥有的Xcode库.
是以sudo正确的方式安装cocoaPods吗?
如果正常,有没有办法解决pod安装问题?
安装cocoapods后sudo gem install cocoapods,尝试运行" pod setup"会返回此错误:
Could not find 'cocoapods' (>= 0) among 64 total gem(s) (Gem::LoadError)
"sudo gem install cocoapods"的输出:
CHANGELOG:
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.28.0...0.29.0)
• [CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.28.0...0.29.0)
• [cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.2.0...0.3.0)
[ bug/enhancement notes removed for brevity]
Successfully installed cocoapods-0.29.0
Parsing documentation for cocoapods-0.29.0
1 gem installed
当我列出安装的宝石时,我没有在我的本地宝石中看到cocoapods,但我确实看到/usr/local/Cellar/ruby/2.0.0-p0/bin中列出了'pod'.
系统配置:
Mac OS 10.9 (upgraded from 10.8)
Xcode: 5.0.2 (upgrade from 4.x)
Ruby path: /usr/local/Cellar/ruby/2.0.0-p0
我怎样才能让cocopods为我工作?
这是我的设置:
小牛10.9.1 Xcode 5.0.2哪个ruby返回:
/Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
但是dvm install ruby返回:
Already installed ruby-2.1.0.
To reinstall use:
    rvm reinstall ruby-2.1.0
所以这不意味着我有ruby 2.1.0吗?
gems list说我已经安装了可可豆荚和cocoapods-core 0.29.0以及其他一些宝石.
在sudo gem安装可可豆荚之后,我获得了一堆提取并更改了日志和成功安装的可可豆荚0.29.0.然后解析并安装文档,当我运行pod setup时,我得到了:
Setting up CocoaPods master repo
Setup completed (read-only access)
所以我从教程中创建了一个文件:
platform :iOS, '7.0'
pod 'Mantle'
pod 'TSMessages'
pod 'ReactiveCocoa'
但是当我运行pod安装时,我得到:
/Users/myusername/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'cocoa pods' (>= 0) among 37 total gem(s) (Gem::LoadError)
    from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
    from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
    from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/pod:22:in `<main>'
如何正确安装pod以及为什么我收到ruby 1.9.3的消息?