尝试安装gem时,我收到此错误:
C:\WINDOWS\system32>gem install sqlint
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing sqlint:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/pg_query-0.9.2/ext/pg_query
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20170810-19576-j7fs2b.rb extconf.rb
tar: Cannot connect to C: resolve failed
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby24-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:22:in `<main>': ERROR (RuntimeError)
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/pg_query-0.9.2 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/pg_query-0.9.2/gem_make.out
我可以从下面的帖子中看出,它与tar
在本地路径名中不喜欢:
有关。 (将它们误认为是远程路径名,并且无法连接)
Windows command line tar "cannot connect to d: resolve failed" with Chef Knife
但是,那里给出的答案无法帮助修复gem
。如果我遵循从rubygems.org下载的整个依赖关系树并安装每个单独的组件(首先是依赖关系),它似乎确实正确安装。但是,每次我想安装1个宝石时,尝试这样做都会是一个非常缓慢的过程。
我的问题:如何在Windows上安装gem而不会误认为远程路径的本地路径?
其他信息: