ruby on rails - Can't install Bluecloth 2.2.0 gem in windows 7 -


when running bundle install getting below error.

note: tried gem install bluecloth --platform=ruby same problem.

gem::installer::extensionbuilderror: error: failed build gem native extension.  c:/ruby200/bin/ruby.exe extconf.rb  checking srand()... yes checking random()... no checking rand()... yes checking bzero() in string.h,strings.h... no checking strcasecmp()... yes checking strncasecmp()... yes checking mkdio.h... yes checking ruby/encoding.h... yes creating extconf.h creating makefile  make "destdir=" generating bluecloth_ext-i386-mingw32.def compiling bluecloth.c in file included c:\devkit\mingw\bin\../lib/gcc/i686-w64-     mingw32/4.7.2/../../../../i686-w64-mingw32/include/windows.h:59:0,              c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/winsock2.h:23,              c:/ruby200/include/ruby-2.0.0/ruby/win32.h:40,              c:/ruby200/include/ruby-2.0.0/ruby/defines.h:153,              c:/ruby200/include/ruby-2.0.0/ruby/ruby.h:70,              c:/ruby200/include/ruby-2.0.0/ruby.h:33,              bluecloth.h:14,              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: 2 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 remain installed in c:/ruby200/lib/ruby/gems/2.0.0/gems/bluecloth-2.2.0    inspection. results logged c:/ruby200/lib/ruby/gems/2.0.0/gems/bluecloth-2.2.0/ext/gem_make.out error occurred while installing bluecloth (2.2.0), , bundler cannot 

continue.

make sure gem install bluecloth -v '2.2.0' succeeds before bundling.

process finished exit code 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 pushing heroku ##  note: run test before upgrading tagged version. 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 pushing 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   #gem 'mysql2', '~> 0.3.12'   gem 'rails_12factor' end  group :development   #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 , redcloth generating yardocs   gem 'yard'   gem 'redcloth' end group :test, :development   gem 'capybara', "~> 1.1"#, :git => 'git://github.com/jnicklas/capybara.git'   gem 'launchy'   gem 'database_cleaner', "~> 1.2" end  group :test   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 

it duplicate: bluecloth v2.0.10 windows 7 not working

i tried working fine:

if need 2.2.0 (the latest version), here's how got work:

install devkit

run command below install bluecloth:

gem install bluecloth

this fail miserably when building "native extensions", install gem's source code.

patch bluecloth.h file (for me, found in: d:\ruby\ruby-1.9.3-p125\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\ext), patch here: https://gist.github.com/1539611

go bluecloth's gem installation folder. me, looks below:

d:\ruby\ruby-1.9.3-p125\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0

run following command:

rake gem

it may prompt install other gems, follow accordingly. when it's done, should see bluecloth-2.2.0.gem created. me, found here:

d:\ruby\ruby-1.9.3-p125\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\pkg\bluecloth-2.2.0.gem

go bluecloth-2.2.0.gem location, , run following command:

gem install bluecloth-2.2.0.gem --platform=ruby


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -