我试图在reactnative插件文件夹中进行“pod安装”,但在标题中看到错误。我在Windows10上运行这个。下面的错误模板:
命令
C:/Ruby25-x64/bin/pod install
报告
堆叠
CocoaPods : 1.5.3
Ruby : ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
RubyGems : 3.0.2
Host : Unable to find an executable (No such file or directory - sw_vers) ()
Xcode : -version) ()
Git : git version 2.15.0.windows.1
Ruby lib dir : C:/Ruby25-x64/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ f403c4e44587a5045a9ed48ddca2ea6fc108b66b
插件
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
播客文件
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
use_frameworks!
target 'RNPhotoEditor' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for RNPhotoEditor
pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
end
错误
Errno::ENOENT - No such file or directory - env -u GIT_CONFIG git -C "C:/Users/Owner/.cocoapods/repos/master" config --get remote.origin.url
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source.rb:448:in ``'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source.rb:448:in `repo_git'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source.rb:46:in `url'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source/manager.rb:347:in `block in source_with_url'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source/manager.rb:346:in `each'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source/manager.rb:346:in `find'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/source/manager.rb:346:in `source_with_url'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/sources_manager.rb:18:in `find_or_create_source_with_url'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:873:in `block in sources'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:872:in `map'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:872:in `sources'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:780:in `block in resolve_dependencies'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:779:in `resolve_dependencies'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:88:in `analyze'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
C:/Ruby25-x64/bin/pod:23:in `load'
C:/Ruby25-x64/bin/pod:23:in `<main>'
如果我转到那一行,我会发现:
def repo_git(args, include_error: false)
command = "env -u GIT_CONFIG git -C \"#{repo}\" " << args.join(' ')
command << ' 2>&1' if include_error
(`#{command}` || '').strip #<--this line here
end
如果我运行“ruby env”,我会得到以下结果:
Traceback (most recent call last):
ruby: No such file or directory -- env (LoadError)
另外,如果我只运行'env',则会收到预期未找到的错误消息:''env'无法识别为内部或外部命令,
可操作的程序或批处理文件。所以我认为这意味着系统无法识别env命令,但是似乎有必要运行“pod install”。
我已经做了一些关于让env在windows上工作的google,但是我很确定我没有正确地搜索我的问题,因为我没有找到结果。我想到目前为止,我已经安装了ruby、ruby gems和cocoapods,试图让一些rn插件工作。
任何帮助都将不胜感激。