2012-01-13 9 views
5

Windows上でRuby on Rails 3.1用にPublish WebブログCMS 6.0.9をインストールしようとしています。バンドルインストールでパブリッシュをインストールすると、bluecloth gemにエラーが発生する

blueclothの宝石をインストールするときに、私はbundle installPublifyしようとするたびに、私は、同じエラーメッセージが表示されます。

C:\Users\Lunasea\Downloads\typo-6.0.9>gem install 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:/RailsInstaller/Ruby1.9.2/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:/RailsInstaller/Ruby1.9.2/bin/ruby -e "puts 'EXPORTS', 'Init_bluecloth_ext'" 
> bluecloth_ext-i386-mingw32.def 
gcc -I. -IC:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/i386-mingw32 -I/C/Rails 
Installer/Ruby1.9.2/include/ruby-1.9.1/ruby/backward -I/C/RailsInstaller/Ruby1.9 
.2/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-st 
rings -Wno-missing-field-initializers -Wno-long-long -I. -o bluecloth.o -c blue 
cloth.c 
In file included from c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5. 
1/../../../../include/windows.h:48:0, 
       from c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5. 
1/../../../../include/winsock2.h:22, 
       from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/win32. 
h:33, 
       from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/define 
s.h:205, 
       from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/ruby.h 
:74, 
       from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby.h:32, 
       from bluecloth.h:14, 
       from bluecloth.c:25: 
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/ 
windef.h:229:23: error: duplicate 'unsigned' 
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/ 
windef.h:238:23: error: duplicate 'unsigned' 
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/ 
windef.h:238:23: error: two or more data types in declaration specifiers 
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/ 
windef.h:241:24: error: duplicate 'unsigned' 
make: *** [bluecloth.o] Error 1 


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9 
.1/gems/bluecloth-2.2.0 for inspection. 
Results logged to C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bluecloth 
-2.2.0/ext/gem_make.out 

私はすでに最新バージョンをインストールするために、単独で、または単に宝石をインストールしようとしたが、それが与えます常に同じ結果になります。

私は標準で生成されたdatabase.ymlを使用しています。

答えて

2

Windowsは、レールを下に走らせる最高の環境ではありません。これは良い例です。詳細については、this linkを参照してください。

+0

感謝を迅速に答えを!パッチplzのインストールを手伝ってくれますか?私は決してそれをやったことはありません...環境について私はWindowsは最高ではありませんが、私はMacを持っていないことを知っています。私はLinux VMWare上でprogrammをしたくありません。 –

+0

"赤い"行を削除し、あなたが提供したリンクに "緑色の"行を追加してパッチをテストしましたが、うまくいきませんでした...:S –

5

2.2.0のヘッダーファイルは、ウィンドウでのブルーライトのコンパイルを防ぎます。お持ちでない場合は

    1. 実行gem install bluecloth -v '2.2.0'を私のマシン上でそれが

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

    2. に位置しており、 bluecloth.hファイルに this patchを適用します。ただし、自分でそれをパッチすることができます
    3. bluecloth 2.2.0ディレクトリに移動します。たとえば、

      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

  • +0

    パッチはruby 1.9.3 mingw/Windows 7の問題を解決しました。 – nre

    +0

    私のようなpplに面するエラーの場合:手順4の後に のpkgディレクトリの内容をtemp dirに移動し、temp dirに移動してから手順5でコマンドを実行します。 – TheAshwaniK

    +0

    手順4はエラーをスローします - 別の質問はこちら - http://stackoverflow.com/questions/24327130/ruby-error-with-installing-bluecloth-2-2-0-gem-in-win-7-ruby-1-9-3 – user3206440

    関連する問題