2011-12-18 2 views
2

現在私のPCにwatirをインストールしようとしていますが、現在以下のエラーが表示されています。WatirはXP x86またはWin 7 x64にはインストールされません。 FFI gemのネイティブエクステンションを構築中にエラーが発生しました

私がインストールするには、以下の手順に従っています:私はこれを行うと

Download ruby 1.9.2: 
http://www.ruby-lang.org/en/downloads/ 
Install. 

Download RubyGems: 
http://rubygems.org/pages/download 
Install. 

Download the DevKit so that native extensions can be built: 
    ruby dk.rb init 
    ruby dk.rb review 
    ruby dk.rb install 

gem update --system (or to do more quickly: gem update --system --no-rdoc --no-ri) 
    gem install watir 

は私が得るすべてのエラーログ以下です。 Watirにどのようにインストールしてもらえるか誰にでも分かりますか?

C:\Documents and Settings\IE User\Desktop\Ruby and Eclipse>gem install watir 
Fetching: win32-api-1.4.8-x86-mingw32.gem (100%) 
Fetching: windows-api-0.4.0.gem (100%) 
Fetching: windows-pr-1.2.1.gem (100%) 
Fetching: win32-process-0.6.5.gem (100%) 
Fetching: xml-simple-1.1.1.gem (100%) 
Fetching: hoe-2.12.4.gem (100%) 
Fetching: s4t-utils-1.0.4.gem (100%) 
WARNING: s4t-utils-1.0.4 has an invalid nil value for @cert_chain 
Fetching: builder-3.0.0.gem (100%) 
Fetching: user-choices-1.1.6.1.gem (100%) 
Fetching: commonwatir-2.0.4.gem (100%) 
Fetching: nokogiri-1.5.0-x86-mingw32.gem (100%) 
Fetching: ffi-1.0.11.gem (100%) 
Temporarily enhancing PATH to include DevKit... 
Building native extensions. This could take a while... 
ERROR: Error installing watir: 
ERROR: Failed to build gem native extension. 
    C:/Ruby192/bin/ruby.exe extconf.rb 

checking for ffi.h... no 
checking for ffi.h in /usr/local/include... no 
checking for rb_thread_blocking_region()... yes 
checking for ruby_thread_has_gvl_p()... yes 
checking for ruby_native_thread_p()... yes 
checking for rb_thread_call_with_gvl()... yes 
creating extconf.h 
creating Makefile 

make 
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_ffi_c'" > ffi_c-i386-mingw32.def 
Configuring libffi 
make -C "/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi" 
make[1]: Entering directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ 
ffi_c/libffi' 
make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLA 
GS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c 
-m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install - 
c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKE 
INFO=/bin/sh /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/mis 
sing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/b 
in/sh" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/loc 
al/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=c:/documents 
and settings/ie user/desktop/ruby and eclipse/mingw/mingw32/bin/ld.exe" "NM=/usr 
/mingw/bin/nm" "RANLIB=ranlib" "DESTDIR=" all-recursive 
make[2]: Entering directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ 
ffi_c/libffi' 
Making all in include 
make[3]: Entering directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ 
ffi_c/libffi/include' 
make[3]: Nothing to be done forall'. 
make[3]: Leaving directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f 
fi_c/libffi/include' 
Making all in testsuite 
make[3]: Entering directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ 
ffi_c/libffi/testsuite' 
make[3]: Nothing to be done for all'. 
make[3]: Leaving directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f 
fi_c/libffi/testsuite' 
Making all in man 
make[3]: Entering directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ 
ffi_c/libffi/man' 
make[3]: Nothing to be done forall'. 
make[3]: Leaving directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f 
fi_c/libffi/man' 
make[3]: Entering directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ 
ffi_c/libffi' 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/debug.lo src/debug.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/debug.c -DDLL_EXPORT -DPIC -o src/.libs/debug.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/prep_cif.lo src/prep_ci 
f.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/prep_cif.c -DDLL_EXPORT -DPIC -o src/.libs/prep_cif.o 

/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/types.lo src/types.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/types.c -DDLL_EXPORT -DPIC -o src/.libs/types.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/raw_api.lo src/raw_api. 
c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/raw_api.c -DDLL_EXPORT -DPIC -o src/.libs/raw_api.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/java_raw_api.lo src/jav 
a_raw_api.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/java_raw_api.c -DDLL_EXPORT -DPIC -o src/.libs/java_r 
aw_api.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/closures.lo src/closure 
s.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/closures.c -DDLL_EXPORT -DPIC -o src/.libs/closures.o 

/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc 
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/x86/ffi.lo src/x86/ffi. 
c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa 
ll -g -fexceptions -c src/x86/ffi.c -DDLL_EXPORT -DPIC -o src/x86/.libs/ffi.o 
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iin 
clude -I./src -I. -I./include -Iinclude -I./src -c -o src/x86/win32.lo src/x86 
/win32.S 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I. 
-I./include -Iinclude -I./src -c src/x86/win32.S -DDLL_EXPORT -DPIC -o src/x86 
/.libs/win32.o 
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -fexceptions -version-inf 
o grep -v '^#' ./libtool-version -no-undefined -o libffi.la -rpath /usr/local 
/lib src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.l 
o src/closures.lo src/x86/ffi.lo src/x86/win32.lo 
libtool: link: gcc -o .libs/libffi.dll.a src/.libs/debug.o src/.libs/prep_cif.o 
src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closur 
es.o src/x86/.libs/ffi.o src/x86/.libs/win32.o echo "X" | /usr/bin/sed -e 1 
s/^X// -e 's/ -lc$//' -link -dll 
c:/documents and settings/ie user/desktop/ruby and eclipse/mingw/bin/../lib/gcc/ 
mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -link 
collect2: ld returned 1 exit status 
make[3]: *** [libffi.la] Error 1 
make[3]: Leaving directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f 
fi_c/libffi' 
make[2]: *** [all-recursive] Error 1 
make[2]: Leaving directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f 
fi_c/libffi' 
make[1]: *** [all] Error 2 
make[1]: Leaving directory `/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f 
fi_c/libffi' 
make: *** ["/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"/.li 
bs/libffi_convenience.a] Error 2 

Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.1 
1 for inspection. 
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/gem_m 
ake.out 

私はこれをどのように修正するかについて完全に迷っています。私はXP x86とWin 7 X64の両方でこれを試したが役に立たなかった。事前に

おかげで アンディはFFIの

+0

RubyInstaller(http://rubyinstaller.org/)を試してください。 –

+0

watir webdriverタグが追加されました。私はこれもそこで問題になる可能性があり、この問題を持つ他の誰かが問題を起こしやすくなる可能性があるからです。 –

+0

devkitを正しくインストールしていないようです。どこにインストールしましたか? 'c:\ devkit'のようにスペースなしのパスであれば最高です。 –

答えて

7

以降のバージョンでは、彼らはもはやも起因して、ネイティブのWindowsのバージョンが含まれておらず、その場で1を構築する必要があり、両方のため、いくつかのための問題の原因となっていますワチールまたはwebdrivers

といくつかのincompatabilitiesこの

gem uninstall ffi 
(just in case there is anything that managhed to get installed) 
gem install ffi -v 1.0.9 

をやってみ次にワチールまたはワチール-webdriverを

をインストール

更新: FFIの最新バージョンはWatirとWatir-Webdriverで正常に動作しますが、以前のバージョンと同じように「プリコンパイル」されません。あなたがまだそれを持っていない場合、あなたはDevkitを取得する必要があります。あなたがdevkitをインストールしてセットアップスクリプトを実行したら、gem install ffiを使って最新のFFI gemをインストールしても問題ありません。

+1

それは例外的です。私があなたに1000000000人の評判のポイントを与えることができれば、ありがとうございました。これが信じられない。私はこれを私のイントールノートに今追加するつもりです!ありがとうチャック! – Andy

+1

悲しいことに、あなたがすることが許されているのは、答えをアップアップすることです。それはあなたの質問だったからです。しかし、担当者はいいですが、それが問題を解決したことを知っていることは、私の本ではより良い報酬です。それは、答えに決して応答しない人の中で、彼らの問題が解決されたかどうかわからないから、大騒ぎに勝ちます。 –

関連する問題