由于json 1.7.5,无法运行bundle更新

时间:2012-09-07 20:04:17

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

我似乎无法使用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.

2 个答案:

答案 0 :(得分:2)

DevKit目录中的

ruby dk.rb install --force可以解决问题。

答案 1 :(得分:0)

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

您可以通过安装RubyInstaller的DevKit解决大多数宝石的编译问题,可从downloads page

获取

下载完成后,请关注RubyInstaller维基页面的installation instructions

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

gem install json

它应该成功。

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

ruby dk.rb install --force

在DevKit目录中。