web-dev-qa-db-ja.com

Windowsにシンをインストールできない

Windowsに薄い宝石をインストールできません。ネイティブ拡張のビルド中に何かが発生しました。

誰かが同じ問題に直面していますか?

スタックトレースは次のとおりです。

>gem install thin --no-ri --no-rdoc
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing thin:
        ERROR: Failed to build gem native extension.

C:/Ruby/bin/Ruby.exe extconf.rb
checking for rb_trap_immediate in Ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
checking for main() in -lssl... no
creating Makefile

make
g++ -I. -IC:/Ruby/include/Ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/Ruby-1.9.1/Ruby/backward -I/C/Ru
by/include/Ruby-1.9.1 -I. -DBUILD_FOR_Ruby -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THR
EAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_
MAKE_PAIR    -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -
Wno-missing-field-initializers -Wno-long-long   -o binder.o -c binder.cpp
In file included from project.h:137:0,
                 from binder.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
                 from binder.cpp:20:
em.h:91:47: warning: type qualifiers ignored on function return type
em.h:92:76: warning: type qualifiers ignored on function return type
em.h:93:56: warning: type qualifiers ignored on function return type
em.h:95:57: warning: type qualifiers ignored on function return type
em.h:96:60: warning: type qualifiers ignored on function return type
em.h:97:58: warning: type qualifiers ignored on function return type
em.h:98:55: warning: type qualifiers ignored on function return type
em.h:99:36: warning: type qualifiers ignored on function return type
em.h:101:47: warning: type qualifiers ignored on function return type
em.h:106:42: warning: type qualifiers ignored on function return type
em.h:123:45: warning: type qualifiers ignored on function return type
em.h:132:36: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from binder.cpp:20:
eventmachine.h:45:61: warning: type qualifiers ignored on function return type
eventmachine.h:46:112: warning: type qualifiers ignored on function return type
eventmachine.h:47:69: warning: type qualifiers ignored on function return type
eventmachine.h:49:73: warning: type qualifiers ignored on function return type
eventmachine.h:62:75: warning: type qualifiers ignored on function return type
eventmachine.h:63:74: warning: type qualifiers ignored on function return type
eventmachine.h:64:77: warning: type qualifiers ignored on function return type
eventmachine.h:65:41: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from binder.cpp:20:
eventmachine.h:99:60: warning: type qualifiers ignored on function return type
eventmachine.h:100:58: warning: type qualifiers ignored on function return type
eventmachine.h:102:60: warning: type qualifiers ignored on function return type
eventmachine.h:105:41: warning: type qualifiers ignored on function return type
g++ -I. -IC:/Ruby/include/Ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/Ruby-1.9.1/Ruby/backward -I/C/Ru
by/include/Ruby-1.9.1 -I. -DBUILD_FOR_Ruby -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THR
EAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_
MAKE_PAIR    -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -
Wno-missing-field-initializers -Wno-long-long   -o cmain.o -c cmain.cpp
In file included from project.h:137:0,
                 from cmain.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
                 from cmain.cpp:20:
em.h:91:47: warning: type qualifiers ignored on function return type
em.h:92:76: warning: type qualifiers ignored on function return type
em.h:93:56: warning: type qualifiers ignored on function return type
em.h:95:57: warning: type qualifiers ignored on function return type
em.h:96:60: warning: type qualifiers ignored on function return type
em.h:97:58: warning: type qualifiers ignored on function return type
em.h:98:55: warning: type qualifiers ignored on function return type
em.h:99:36: warning: type qualifiers ignored on function return type
em.h:101:47: warning: type qualifiers ignored on function return type
em.h:106:42: warning: type qualifiers ignored on function return type
em.h:123:45: warning: type qualifiers ignored on function return type
em.h:132:36: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from cmain.cpp:20:
eventmachine.h:45:61: warning: type qualifiers ignored on function return type
eventmachine.h:46:112: warning: type qualifiers ignored on function return type
eventmachine.h:47:69: warning: type qualifiers ignored on function return type
eventmachine.h:49:73: warning: type qualifiers ignored on function return type
eventmachine.h:62:75: warning: type qualifiers ignored on function return type
eventmachine.h:63:74: warning: type qualifiers ignored on function return type
eventmachine.h:64:77: warning: type qualifiers ignored on function return type
eventmachine.h:65:41: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from cmain.cpp:20:
eventmachine.h:99:60: warning: type qualifiers ignored on function return type
eventmachine.h:100:58: warning: type qualifiers ignored on function return type
eventmachine.h:102:60: warning: type qualifiers ignored on function return type
eventmachine.h:105:41: warning: type qualifiers ignored on function return type
cmain.cpp:98:71: warning: type qualifiers ignored on function return type
cmain.cpp:109:122: warning: type qualifiers ignored on function return type
cmain.cpp:119:79: warning: type qualifiers ignored on function return type
cmain.cpp:129:83: warning: type qualifiers ignored on function return type
cmain.cpp:260:85: warning: type qualifiers ignored on function return type
cmain.cpp:270:84: warning: type qualifiers ignored on function return type
cmain.cpp:280:88: warning: type qualifiers ignored on function return type
cmain.cpp:290:51: warning: type qualifiers ignored on function return type
cmain.cpp:300:70: warning: type qualifiers ignored on function return type
cmain.cpp:320:55: warning: type qualifiers ignored on function return type
cmain.cpp:546:70: warning: type qualifiers ignored on function return type
cmain.cpp:669:68: warning: type qualifiers ignored on function return type
cmain.cpp: In function 'int evma_send_file_data_to_connection(long unsigned int, const char*)':
cmain.cpp:752:6: error: cannot convert 'stat*' to '_stati64*' for argument '2' to 'int _fstati64(int
, _stati64*)'
make: *** [cmain.o] Error 1


Gem files will remain installed in C:/Ruby/lib/Ruby/gems/1.9.1/gems/eventmachine-0.12.10 for inspect
ion.
Results logged to C:/Ruby/lib/Ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
65
Alexey Zakharov

最初に、RubyInstaller for WindowsからDevKitをインストールします website (すでに実行されているようです)。

次に、Rogerが示すように、gitリポジトリとは別にeventmachineをインストールします。

> gem install specific_install
Successfully installed backports-1.18.1
Successfully installed specific_install-0.2.3
2 gems installed
...
> gem specific_install -l http://github.com/eventmachine/eventmachine.git
git installing from http://github.com/eventmachine/eventmachine.git
...
Successfully built RubyGem
Name: eventmachine
Version: 0.12.11
File: eventmachine-0.12.11.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed eventmachine-0.12.11
1 gem installed
...
successfully installed

これで、gemからシンをインストールできるようになります。

> gem install thin
Temporarily enhancing PATH to include DevKit...
Successfully installed thin-1.2.7-x86-mingw32
1 gem installed 
...
> thin start
Using rack adapter
Thin web server (v1.2.7 codename No Hup)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
6
bryanweatherly

これはあなたを助けます...

以下の行をgemファイルに追加します

gem 'eventmachine'、:git => 'https://github.com/eventmachine/eventmachine.git'

次にバンドルインストールを実行します

3
Kamal Durai

次を実行してみてください

gem install thin –ignore-dependencies

失敗した場合は、rackとeventmachineのインストールを再試行してから、上記のコマンドを再実行してください。

gem install rack
gem install eventmachine -l
gem install thin –ignore-dependencies
3
lmmendes

これは役立つかもしれません:

$ gem install specific_install
$ gem specific_install -l http://github.com/eventmachine/eventmachine.git
1
rogerdpack

事前にビルドされたバイナリを使用して、自分でビルドせずにThinをインストールできますが、どれを知っている必要があります。最新のビルド済みのwin32バージョンを取得するには、次の手順を実行します。

  1. RubyGems Thinページに移動します
  2. 「バージョン」セクションで、右側に「x86-mswin32」が付いているバージョンを探します。 (現在のバージョン1.2.11、1.2.10などには、すべてwin32バイナリが含まれています)
  3. 次の「gem install」コマンドを、「-v」フラグを含むThinのバージョンで実行します。

gem install thin -v 1.2.11

これは私のインストールの結果です:

 c:\> gem install thin -v 1.2.11 
正常にインストールされたthin-1.2.11-x86-mswin32 
 1 gemがインストールされました
 riのドキュメントをインストールthin-1.2.11-x86-mswin32 ... 
 riクラスキャッシュを3611クラスで更新しています... 
 thin-1.2.11-x86-mswin32のRDocドキュメントをインストールしています... 
0
Brent Matzelle