JSON Gem不会安装(Windows) [英] JSON Gem will not install (Windows)

查看:130
本文介绍了JSON Gem不会安装(Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试更新或安装JSON gem时,都会出现构建错误。这些是输出文件中的结果:

  c:/Ruby193/bin/ruby.exe extconf.rb 
创建Makefile

make
生成解析器-i386-mingw32.def
编译parser.c
从c:/Ruby193/include/ruby-1.9包含的文件中。 1 / ruby​​ / ruby​​.h:1360,来自c:/Ruby193/include/ruby-1.9.1/ruby.h:32的
,来自../fbuffer/fbuffer.h:6的

来自parser.rl:1:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:41:错误:重新定义'struct timespec'
c:/ Ruby193 /include/ruby-1.9.1/ruby/missing.h:48:错误:重新定义'struct timezone'
make:*** [parser.o]错误1



b
$ b

我开始学习Rails, hr>

以下是生成的默认Gemfile:

  source'http:/ /rubygems.org'

gem'rails','3.1.3'

#捆绑Rai ls代替:
#gem'rails',:git => 'git://github.com/rails/rails.git'

gem'sqlite3'


#仅用于资产而不需要的宝石
#在生产环境中默认。
group:assets do
gem'sass-rails','〜> 3.1.5'
gem'咖啡栏','〜> 3.1.1'
gem'uglifier','> = 1.0.3'
结束

gem'jquery-rails'

#To使用ActiveModel has_secure_password
#gem'bcrypt-ruby','〜> 3.0.0'

#使用独角兽作为web服务器
#gem'unicorn'

#使用Capistrano部署
#gem'capistrano'

#使用调试器
#gem'ruby-debug19',:require => 'ruby-debug'

group:test do
#漂亮的打印测试输出
gem'turn','〜> 0.8.3',:require =>假
结束


解决方案

本机构建工具可确保您安装了 DevKit 。说明在链接中提供。



您可以添加 gem install json 的结果或适当的命令吗?

Every time I try updating or installing the JSON gem I get a build error. These are the results in the output file:

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

make
generating parser-i386-mingw32.def
compiling parser.c
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1360,
                 from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
                 from ../fbuffer/fbuffer.h:6,
                 from parser.rl:1:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:41: error: redefinition of 'struct timespec'
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:48: error: redefinition of 'struct timezone'
make: *** [parser.o] Error 1

I'm starting learning Rails and I wanted to figure this out before I continue.


Here's the default Gemfile that was generated:

source 'http://rubygems.org'

gem 'rails', '3.1.3'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.5'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

group :test do
  # Pretty printed test output
  gem 'turn', '~> 0.8.3', :require => false
end

解决方案

For building Gems that require native build tools make sure you have the DevKit installed. Instructions are provided in the link.

Could you add the results of the gem install json or appropriate command please?

这篇关于JSON Gem不会安装(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆