手贱更新了最新的ruby和cocoapods,对一个新项目使用pod时出现了如下错误
### Error
RuntimeError - can't modify frozen String
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:407:in `block (2 levels) in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `block in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:65:in `rescue in resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:57:in `resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:559:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:557:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:75:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:222:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:146:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:145:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:109:in `install!'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:67:in `run_install_with_update'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:97:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/claide-1.0.0.beta.1/lib/claide/command.rb:312:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command.rb:48:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `eval'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `<main>'
完整的运行日志如下:
Updating local specs repositories
Analyzing dependencies
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
/usr/local/bin/pod install
What did you do?
What did you expect to happen?
What happened instead?
CocoaPods : 1.0.0.beta.4
Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
RubyGems : 2.5.1
Host : Mac OS X 10.11.3 (15D21)
Xcode : 7.2.1 (7C1002)
Git : git version 2.5.4 (Apple Git-61)
Ruby lib dir : /Users/zhq/.rvm/rubies/ruby-2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 4672fa6266f3ad8a6b03e7ab852fac0a8aba6cfc
cocoapods-deintegrate : 1.0.0.beta.1
cocoapods-plugins : 1.0.0.beta.1
cocoapods-search : 1.0.0.beta.1
cocoapods-stats : 1.0.0.beta.3
cocoapods-trunk : 1.0.0.beta.2
cocoapods-try : 1.0.0.beta.2
platform :ios, ‘6.0’
use_frameworks!
target 'ikea' do
pod 'JSONModel', '~> 1.2.0'
pod 'MBProgressHUD', '~> 0.9.2'
pod 'MJRefresh', '~> 3.1.0'
pod 'FMDB', '~> 2.6'
pod 'YYKit', '~> 0.9.11'
pod 'OpenShare', '~> 0.0.1'
pod 'UMengAnalytics', '~> 3.6.6'
pod 'BaiduMapKit', '~> 2.10.0'
pod 'CocoaLumberjack', '~> 2.2.0'
pod 'SDWebImage', '~> 3.7.5’
pod 'Masonry', '~> 0.6.1'
pod 'pop', '~> 1.0.7'
pod 'AFNetworking', '~> 3.0.4'
end
RuntimeError - can't modify frozen String
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:407:in `block (2 levels) in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `block in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:65:in `rescue in resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:57:in `resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:559:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:557:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:75:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:222:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:146:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:145:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:109:in `install!'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:67:in `run_install_with_update'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:97:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/claide-1.0.0.beta.1/lib/claide/command.rb:312:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command.rb:48:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `eval'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=can%27t+modify+frozen+String&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
zhangheqingdeMacBook-Pro:ikea zhq$ touch Podfile
zhangheqingdeMacBook-Pro:ikea zhq$ open -e Podfile
zhangheqingdeMacBook-Pro:ikea zhq$ pod install
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.0.4)
Installing BaiduMapKit (2.10.0)
Installing CocoaLumberjack (2.2.0)
Installing FMDB (2.6)
Installing JSONModel (1.2.0)
Installing MBProgressHUD (0.9.2)
Installing MJRefresh (3.1.0)
Installing Masonry (0.6.4)
Installing OpenShare (0.0.1)
Installing SDWebImage (3.7.5)
Installing UMengAnalytics (3.6.6)
Installing YYKit (0.9.11)
Installing pop (1.0.9)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use ikea.xcworkspace
for this project from now on.
Sending stats
Pod installation complete! There are 13 dependencies from the Podfile and 13 total pods installed.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
Sometimes it’s better to try reinstalling.
have a try