运行时bundle install
我收到以下错误。
注意:我也尝试了gem install bluecloth --platform=ruby
但同样的问题。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
checking for srand()... yes
checking for random()... no
checking for rand()... yes
checking for bzero() in string.h,strings.h... no
checking for strcasecmp()... yes
checking for strncasecmp()... yes
checking for mkdio.h... yes
checking for ruby/encoding.h... yes
creating extconf.h
creating Makefile
make "DESTDIR="
generating bluecloth_ext-i386-mingw32.def
compiling bluecloth.c
In file included from c:\devkit\mingw\bin\../lib/gcc/i686-w64- mingw32/4.7.2/../../../../i686-w64-mingw32/include/windows.h:59:0,
from c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/winsock2.h:23,
from c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:40,
from c:/Ruby200/include/ruby-2.0.0/ruby/defines.h:153,
from c:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:70,
from c:/Ruby200/include/ruby-2.0.0/ruby.h:33,
from bluecloth.h:14,
from bluecloth.c:25:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/windef.h:113:23: error: duplicate 'unsigned'
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/windef.h:113:23: error: two or more data types in declaration specifiers
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/windef.h:114:24: error: duplicate 'unsigned'
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64- mingw32/include/windef.h:115:23: error: duplicate 'unsigned'
make: *** [bluecloth.o] Error 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/bluecloth-2.2.0 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/bluecloth-2.2.0/ext/gem_make.out
An error occurred while installing bluecloth (2.2.0), and Bundler cannot
继续。
在捆绑之前确保gem install bluecloth -v '2.2.0'
成功。
使用退出代码5完成流程
............................................... .....................
的Gemfile
source 'http://rubygems.org'
ruby "2.0.0"
## Bundle rails:
gem 'rails', '4.0.4'
gem 'pg'
gem 'uglifier', '>= 1.3.0'
gem 'sass-rails', '~> 4.0.0'
gem 'actionpack-page_caching'
gem "activemerchant", '~> 1.29.3'#, :lib => 'active_merchant'
gem "american_date"
# Use https if you are pushing to HEROKU
## NOTE: run the test before upgrading to the tagged version. It has had several deprecation warnings.
gem 'authlogic', github: 'binarylogic/authlogic', ref: 'e4b2990d6282f3f7b50249b4f639631aef68b939'
#gem 'authlogic', "~> 3.3.0"
gem "asset_sync"
gem 'awesome_nested_set', '~> 3.0.0.rc.1'
gem 'aws-sdk'
gem 'bluecloth', '~> 2.2.0'
gem 'cancan', '~> 1.6.8'
gem 'chronic'
# Use https if you are pushing to HEROKU
gem 'compass-rails', git: 'https://github.com/Compass/compass-rails.git'
#gem 'compass-rails', git: 'git://github.com/Compass/compass-rails.git'
gem 'dynamic_form'
gem 'jbuilder'
gem "friendly_id", '~> 5.0.1'#, :git => "git@github.com:FriendlyId/friendly_id.git", :branch => 'rails4'
gem "jquery-rails"
gem 'jquery-ui-rails'
gem 'json', '~> 1.8.0'
#gem "nifty-generators", :git => 'git://github.com/drhenner/nifty-generators.git'
gem 'nokogiri', '~> 1.6.0'
gem 'paperclip', '~> 3.0'
gem 'prawn', '~> 0.12.0'
gem "rails3-generators", "~> 1.0.0"
#git: "https://github.com/neocoin/rails3-generators.git"
gem "rails_config"
gem 'rmagick', :require => 'RMagick'
gem 'rake', '~> 10.1'
# gem 'resque', require: 'resque/server'
gem 'state_machine', '~> 1.2.0'
#gem 'sunspot_solr', '~> 2.0.0'
#gem 'sunspot_rails', '~> 2.0.0'
gem 'will_paginate', '~> 3.0.4'
gem 'zurb-foundation', '~> 4.3.2'
group :production do
#gem 'mysql2', '~> 0.3.12'
gem 'rails_12factor'
end
group :development do
#gem 'sqlite3'
gem 'railroady'
#gem 'awesome_print'
#gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
gem "autotest-rails-pure"
gem "better_errors", '~> 0.9.0'
gem "binding_of_caller", '~> 0.7.2'
gem 'debugger'#, '~> 1.6.1'
gem "rails-erd"
# YARD AND REDCLOTH are for generating yardocs
gem 'yard'
gem 'RedCloth'
end
group :test, :development do
gem 'capybara', "~> 1.1"#, :git => 'git://github.com/jnicklas/capybara.git'
gem 'launchy'
gem 'database_cleaner', "~> 1.2"
end
group :test do
gem 'factory_girl', "~> 3.3.0"
gem 'factory_girl_rails', "~> 3.3.0"
gem 'mocha', '~> 0.13.3', :require => false
gem 'rspec-rails-mocha'
gem 'rspec-rails', '~> 2.12.2'
gem 'email_spec'
gem "faker"
end
答案 0 :(得分:0)
它重复: Bluecloth v2.0.10 with windows 7 not working
我试过它工作正常:
如果您需要2.2.0(最新版本),请按以下步骤操作:
安装DevKit
运行以下命令安装蓝布:
宝石安装蓝布
在构建“原生扩展”时,这将失败,但会成功安装gem的源代码。
补丁bluecloth.h文件(对我来说,这可以在:D:\ ruby \ Ruby-1.9.3-p125 \ lib \ ruby \ gems \ 1.9.1 \ gems \ bluecloth-2.2.0 \ ext) ,使用此处的补丁:https://gist.github.com/1539611
转到bluecloth的gem安装文件夹。对我来说,这看起来如下:
d:\红宝石\红宝石1.9.3-P125 \ lib中\红宝石\宝石\ 1.9.1 \宝石\ bluecloth-2.2.0
运行以下命令:
rake gem
它可能会提示您安装其他一些宝石,请相应地遵循。完成后,您应该看到创建了bluecloth-2.2.0.gem。对我来说,可以在这里找到:
d:\红宝石\红宝石1.9.3-P125 \ lib中\红宝石\宝石\ 1.9.1 \宝石\ bluecloth-2.2.0 \ PKG \ bluecloth-2.2.0.gem
转到bluecloth-2.2.0.gem位置,然后运行以下命令:
gem install bluecloth-2.2.0.gem --platform = ruby