【问题标题】:Can't run bundle update because of json 1.7.5由于 json 1.7.5 无法运行包更新
【发布时间】:2012-09-01 17:23:35
【问题描述】:

我似乎无法在装有 Ruby 1.9.3p194 的 Windows 7 机器上运行捆绑更新。我也安装了最新的 DevKit。 bundle抱怨缺少make命令,我在硬盘上找不到make(我搜索过)。我如何让它发挥作用?

C:\website>bundle update
Fetching gem metadata from http://rubygems.org/.........
Using rake (0.9.2.2)
Using i18n (0.6.1)
Using multi_json (1.3.6)
Using activesupport (3.2.8)
Using builder (3.0.2)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Using bundler (1.1.5)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Installing json (1.7.5) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile

make
'make' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.5 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 rubygems


    【解决方案1】:

    DevKit 目录中的ruby dk.rb install --force 成功了。

    【讨论】:

    • 我的 Mac 上出现此错误。解决方案是我的 xcode 最近更新了,我不得不重新安装命令行工具。希望对一些 Mac 用户有所帮助。
    【解决方案2】:

    有些 gem 需要编译,json gem 就是这种情况。

    您可以通过安装 RubyInstaller 的 DevKit(可从downloads page 获得)来解决大多数 gem 的编译问题

    下载后,请关注来自 RubyInstaller wiki 页面的installation instructions

    安装后,打开一个新的命令提示符并再次尝试安装有问题的 gem:

    gem install json
    

    应该会成功。

    这是考虑到 DevKit 已正确安装。正如 RubyInstaller 邮件列表中所讨论的,您可以强制安装 DevKit:

    ruby dk.rb install --force
    

    在 DevKit 目录中。

    【讨论】:

    猜你喜欢
    • 2019-03-12
    • 1970-01-01
    • 2018-06-27
    • 2022-08-06
    • 1970-01-01
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 2021-08-06
    相关资源
    最近更新 更多