2011-12-29 2 views
3

Windows에서 내 버전의 bluecloth gem을 업데이트하는 중에 오류 메시지가 나타납니다. Windows 용으로 설치해야하는 다른 버전이나 사용할 수있는 블루투스 대신 사용할 수있는 버전이 있습니까? 불행히도 내 개발 환경은 엄격하게도 내가 사용하는 다른 소프트웨어로 인해 Windows입니다. 그렇지 않으면 Linux 환경을 사용하게됩니다.Windows에서 Ruby bluecloth gem을 설치하거나 업데이트 할 수 없습니다. Ruby 1.9.2

C:\Users\Developer1>gem update
Updating installed gems
Updating bluecloth
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:/Ruby192/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 C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_bluecloth_ext'" > bluecloth_ext-i386-mingw32.def gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -DVERSION=\"2.0.9\" -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -I. -o bluecloth.o -c bluecloth.c
In file included from c:\ruby-devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../..
/../include/windows.h:48:0,
from c:\ruby-devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../..
/../include/winsock2.h:22,
from c:/Ruby192/include/ruby-1.9.1/ruby/win32.h:33,
from c:/Ruby192/include/ruby-1.9.1/ruby/defines.h:205,
from c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:74,
from c:/Ruby192/include/ruby-1.9.1/ruby.h:32,
from bluecloth.h:14,
from bluecloth.c:25:
c:\ruby-devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/windef.h:2
29:23: error: duplicate 'unsigned'
c:\ruby-devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/windef.h:2
38:23: error: duplicate 'unsigned'
c:\ruby-devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/windef.h:2
38:23: error: two or more data types in declaration specifiers
c:\ruby-devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/windef.h:2
41:24: error: duplicate 'unsigned'
make: * [bluecloth.o] Error 1

Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/bluecloth-2.2.0 for inspection. Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/bluecloth-2.2.0/ext/gem_make.out Nothing to update

+0

은 이전과 보석을 설치했다 '보석 설치 bluecloth'? – Ramy

답변

3

그것은 C의 확장은 Windows에서 컴파일을 차단하고 BlueCloth에 포함에 헤더가 포함되는 순서 보인다

는 여기에 내가 무엇을 얻을의 복사 붙여 넣기합니다.

다음 패치를 적용 :

https://gist.github.com/1539611

컴파일 및 작동합니다.

아마 젬 제작자에게 문제를 신고 할 수 있습니까?

http://deveiate.org/projects/BlueCloth https://github.com/ged/bluecloth하는 데 도움이

희망.

3

2.2.0의 헤더 파일은 블루투스가 창에서 컴파일되지 않도록합니다. 그러나 직접 패치 할 수 있습니다. Luis Lavena가 언급했듯이 경로를 적용해야합니다.

  1. 실행 gem install bluecloth -v '2.2.0' 당신이

  2. bluecloth.h 파일에 this patch을 적용하지 이미있는 경우는 내 컴퓨터에이 2.2.0 디렉토리를 bluecloth하는

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\ext\bluecloth.h

  3. 이동에 위치 예 :

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0

  4. 실행 rake gem (일부 추가 보석을 설치해야 할 수도 있음).

    는 그런 다음 패치 보석을

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\pkg\bluecloth-2.2.0.gem

  5. 열기에이 디렉토리를 생성 .gem 파일을 참조하고 설치해야합니다

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

+1

정보를 제공해 주셔서 감사 합니다만, 그곳에서 보석을 완전히 지워 버렸습니다. 너는 먼저 그것을 말하지 않았다. –

+0

패치를 적용했지만 동일한 오류가 발생했습니다. 문제를 해결하려고했습니다. 그러나이 주제와 달리 수표는 요구 사항 중 일부를 찾지 못합니다. srandom() ...을 확인하지 않음 srandom() ...을 확인하지 않음 random() ...을 선택하지 않았습니다. rand()를 확인하지 않음 ... string.h의 bzero()를 확인합니다. strings.h ...no strcmp() ... no를 확인합니다. 이 확장 기능은 strcasecmp() 또는 stricmp()를 필요로합니다. devkit을 다시 설치하고 다시 시도해야합니까? –