问题与Ruby gem安装 [英] Issue with Ruby gem install
本文介绍了问题与Ruby gem安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在Windows上安装json,如下所示,但它不起作用。
C:\Ruby193\bin> gem install --local json- 1.8.1.gem
临时增强PATH以包含DevKit ...
构建本机扩展。这可能需要一段时间...
错误:安装json-1.8.1.gem时出错:
错误:未能构建gem本机扩展。
C:/Ruby193/bin/ruby.exe -r ./siteconf20140725-4216-11o740j.rb extconf.rb
创建Makefile
make clean
Makefile:165:***目标模式不包含'%'。停止。
make
Makefile:165:***目标模式不包含'%'。停止。
失败,退出代码2
Gem文件将保持安装在C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1进行检查。
记录到C的结果:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.8.1/gem_make.out
$ c $在Ruby 1.9.3及更早的版本中,RubyGems 2.4.1不会构建本地扩展。
您需要将RubyGems降级到1.8.29。
为此,运行以下命令:
gem update --system 1.8.29
code>
检查宝石版本:
gem -v
1.8.29
现在再次尝试您的命令:
gem install --local json-1.8.1.gem
ref: https:// groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
I am trying to install json on windows as follows, but its not working. Please help me with possible resoultion for the same.
C:\Ruby193\bin>gem install --local json-1.8.1.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json-1.8.1.gem:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20140725-4216-11o740j.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.8.1/gem_make.out
解决方案 RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.
You will need to downgrade RubyGems to 1.8.29.
To do this run the following command:
gem update --system 1.8.29
Check gem version:
gem -v
1.8.29
Now try your command again:
gem install --local json-1.8.1.gem
ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
这篇关于问题与Ruby gem安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文