2012-12-13 7 views
9

にRubyの1.9.3で雑種をインストールここでエラーです:は、どのように私は成功したルビー1.9.3</p> <p>のための雑種をインストールすることができます

Building native extensions. This could take a while... 
ERROR: Error installing mongrel: 
    ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.9.1 extconf.rb 
checking for main() in -lc... yes 
creating Makefile 

make 
compiling http11_parser.c 
compiling http11.c 
http11.c: In function ‘http_field’: 
http11.c:70:3: error: format not a string literal and no format arguments [-Werror=format-security] 
http11.c:71:3: error: format not a string literal and no format arguments [-Werror=format-security] 
http11.c:77:22: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:77:50: error: ‘struct RString’ has no member named ‘len’ 
http11.c:77:27: warning: left-hand operand of comma expression has no effect [-Wunused-value] 
http11.c: In function ‘request_uri’: 
http11.c:102:3: error: format not a string literal and no format arguments [-Werror=format-security] 
http11.c: In function ‘fragment’: 
http11.c:113:3: error: format not a string literal and no format arguments [-Werror=format-security] 
http11.c: In function ‘request_path’: 
http11.c:124:3: error: format not a string literal and no format arguments [-Werror=format-security] 
http11.c: In function ‘query_string’: 
http11.c:135:3: error: format not a string literal and no format arguments [-Werror=format-security] 
http11.c: In function ‘header_done’: 
http11.c:172:13: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:172:13: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:172:13: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:174:89: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:176:52: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:177:26: error: ‘struct RString’ has no member named ‘len’ 
http11.c: In function ‘HttpParser_execute’: 
http11.c:298:23: error: ‘struct RString’ has no member named ‘ptr’ 
http11.c:299:23: error: ‘struct RString’ has no member named ‘len’ 
http11.c:307:5: error: format not a string literal and no format arguments [-Werror=format-security] 
cc1: some warnings being treated as errors 
make: *** [http11.o] Error 1 


Gem files will remain installed in /var/lib/gems/1.9.1/gems/mongrel-1.1.5 for inspection. 
Results logged to /var/lib/gems/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.out 

私はすでにsudo gem install mongrel --pre--source

があっても1を試してみました

なぜ動作しないのかわかりません。 Ruby 1.9.1以上と互換性がありますか?

答えて

10

You are not alone.ただし、スレッドにはa link to a possible fixがあります。私はYMMVを試したことはありませんが、それはもっともらしい解決策のようです。

Mongrelがもう更新されていないとすれば、Thinのようなものに切り替えるのはなぜですか?

編集:申し訳ありませんが、あなたは約1.9.3を求めています。私の理解では、Mongrelは1.9.1まで互換性があるとされていますが、1.9.2+に壊れています。より現代的で維持されているものに切り替えるもう一つの正当な理由。

1

John Bが述べたように、Thin。

Ruby 1.9.3で現在の設定でMongrelをインストールできないと、私はGemfileからMongrelをコメントアウトし、Thin。これは、私のアプリを完全にインストールし、素晴らしい実行させる。私のGemfile

#gem 'mongrel', '1.2.0.pre2' 
gem 'thin' 

は、コマンド以下

bundle install 
関連する問題

 関連する問題