当我尝试使用 gem 安装 http_parser
时出现此错误:
dongl_000@LENNY ~/ava-home (master)
$ gem install http_parser.rb -v '0.6.0'
Building native extensions. This could take a while...
ERROR: Error installing http_parser.rb:
ERROR: Failed to build gem native extension.
c:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160217-15056-1hoiyfc.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating ruby_http_parser-x64-mingw32.def
make: *** No rule to make target '/c/Ruby22-x64/include/ruby-2.2.0/ruby.h', need
ed by 'ruby_http_parser.o'. Stop.
make failed, exit code 2
Gem files will remain installed in c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/http_p
arser.rb-0.6.0 for inspection.
Results logged to c:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0
/http_parser.rb-0.6.0/gem_make.out
我该如何解决这个问题?
版本
ruby : 2.2.1
rubyGem : 2.4.5
最佳答案
我正在经历同样的问题。
查找 Gem (HTTP_Parser) 的 Git 存储库并找出问题的原因:
HTTP_Parser currently doesn't not support a Path with spaces
所以我重命名了我的路径并解决了它。
关于ruby-on-rails - 安装 http_parser.rb 时出现错误 : Failed to build gem native extension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35469619/