0
我安裝了mongo gem。但在運行期間,它表示需要安裝bson_ext gem。所以我試圖在Windows 7專業版中安裝bson_ext gem,但我不能。安裝時出現以下錯誤,所以無法將Ruby連接到我的mongo服務器。任何人都可以幫我解決這個問題。我搜索了所有領域,我發現有人說「做寶石更新 - 系統」解決了這個問題。但即使我得到寶石更新選項的錯誤。我是Ruby和黃瓜的新手。Ruby bson_ext gem未安裝在windows中
C:\Manimaran\Ruby>gem source
*** CURRENT SOURCES ***
http://rubygems.org/
C:\Manimaran\Ruby>gem install bson_ext
WARNING: Error fetching data: Errno::ETIMEDOUT: A connection attempt failed bec
ause the connected party did not properly respond after a period of time, or est
ablished connection failed because connected host has failed to respond. - conne
ct(2) (http://rubygems.org/specs.4.8.gz)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
checking for asprintf()... no
checking for ruby/st.h... yes
checking for ruby/regex.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make
generating cbson-i386-mingw32.def
compiling bson_buffer.c
compiling cbson.c
cbson.c:25:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make: *** [cbson.o] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-
1.11.1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-1.11.1/ext/cbson/
gem_make.out