加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 无法使用Windows在rails中安装JSON宝石

发布时间:2020-12-16 19:45:54 所属栏目:百科 来源:网络整理
导读:我正在做一个软件包安装,所有的gems都可以正常工作,除非 JSON得到 JSON宝石我收到这个错误. Installing json (1.6.1) with native extensions c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:55 2:in `rescue in block in build_extensions': E
我正在做一个软件包安装,所有的gems都可以正常工作,除非 JSON得到 JSON宝石我收到这个错误.
Installing json (1.6.1) with native extensions c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:55
    2:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::E
    xtensionBuildError)

            c:/Ruby192/bin/ruby.exe extconf.rb
    checking for re.h... *** 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.

有什么可能导致这个错误的想法?

解决方法

您正在使用Windows,所以RubyInstaller开发工具包可能会帮助您:
http://rubyinstaller.org/add-ons/devkit/

devkit安装C编译器(和其他一些东西)来编译C写入的部分.

安装它,然后重试安装宝石 – 也许使用选项–platform = ruby??.

详情请见https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读