0

I installed mongo gem. But during run time it says it requires bson_ext gem needs to be installed. So i am trying to install bson_ext gem in windows 7 professional and i couldn't. i am getting the below errors while installing and so i couldn't connect Ruby to my mongo server. Caould anyone help me to resolve this. i searched all areas and i found some saying doing "gem update --system" solves the problem. But even i get error for gem update option. I am new to Ruby and Cucumber.

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
mmar
  • 1,840
  • 6
  • 28
  • 41

1 Answers1

0

the #include in the file cbson.c should be changed into #include. Then you need to build the your own gem and install it locally

Following thread describes it perfectly:

windows: rails: error installing bson_ext

Community
  • 1
  • 1
Tomasz Kolonko
  • 114
  • 1
  • 8