我是所有这一切的新手,但是当我尝试使用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
谢谢!
答案 0 :(得分:3)
我正在经历同样的问题。
查看Gem的Git存储库(HTTP_Parser)并找出问题的原因:
HTTP_Parser currently doesn't not support a Path with spaces
所以我重新命名了我的路径并解决了它。
答案 1 :(得分:0)
希望现在您已经找到答案。但是,对于其他找到这篇文章的人(如我),这是需要的:
make
随MINGW一起提供)。打开一个新的控制台(以获取新的环境变量),然后重新运行您的gem或bundle命令……并希望取得最好的结果。
希望有帮助!