Với Ruby 187, tôi đã tải xuống devkit từ http://rubyinstaller.org/downloads và làm theo hướng dẫn trên https://github.com/oneclick/rubyinstaller/wiki/Development-Kit. Tôi cũng đã đảm bảo rằng bộ cài đặt được cài đặt đúng cách bằng cách thực hiện theo thử nghiệm khói .Bluecloth v2.0.10 với windows 7 không hoạt động
Sau đó tôi đã thử cài đặt phần mềm (v2.0.10). Nó đã thất bại với lỗi sau:
C:\test\typo>gem install bluecloth --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing bluecloth:
ERROR: Failed to build gem native extension.
c:/Ruby187/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... no
creating extconf.h
creating Makefile
make
gcc -I. -I. -Ic:/Ruby187/lib/ruby/1.8/i386-mingw32 -I. -
DRUBY_EXTCONF_H=\"extcon
f.h\" -DVERSION=\"2.0.4\" -g -O2 -DFD_SETSIZE=256 -I. -Wall -c
bluecloth.c
In file included from c:\rubydevkit\mingw\bin\../lib/gcc/
mingw32/4.5.1/../../../../include/windows.h:48:0,
from c:\rubydevkit\mingw\bin\../lib/gcc/
mingw32/4.5.1/../../../../include/winsock2.h:22,
from c:/Ruby187/lib/ruby/1.8/i386-mingw32/win32/
win32.h:27,
from c:/Ruby187/lib/ruby/1.8/i386-mingw32/defines.h:
186,
from c:/Ruby187/lib/ruby/1.8/i386-mingw32/ruby.h:37,
from bluecloth.h:14,
from bluecloth.c:25:
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:229:23: error: duplicate 'unsigned'
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:238:23: error: duplicate 'unsigned'
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:238:23: error: two or more data types in declaration
specifiers
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:241:24: error: duplicate 'unsigned'
bluecloth.c: In function 'bluecloth_initialize':
bluecloth.c:190:9: warning: unused variable 'utf8text'
make: *** [bluecloth.o] Error 1
Gem files will remain installed in c:/Ruby187/lib/ruby/gems/1.8/gems/
bluecloth-2.0.10 for inspection.
Results logged to c:/Ruby187/lib/ruby/gems/1.8/gems/bluecloth-2.0.10/
ext/gem_make.out
C:\test\typo>
Có vẻ vấn đề này là một lỗi của phiên bản 2.0.10. Hãy thử sử dụng một phiên bản cũ hơn như 2.0.7 ('gem install bluecloth -v 2.0.7') –
@LuisLavena Cảm ơn! Tôi có thể cài đặt với 2.0.7. – rpattabi
@LuisLavena cho khoảng thời gian tôi tự hỏi nếu nó có ý nghĩa cho bạn để di chuyển bình luận của bạn đến một câu trả lời? – ScottJShea