让我在这里疯狂。我无法安装bson_ext gem。我在一个非常干净的Windows VM上使用RubyInstaller和DevKit设置得很好。
C:\DevKit>gem install bson_ext
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
答案 0 :(得分:2)
好的,我得到了我的工作。
按照我这样做的顺序尝试:
删除基本的Gem文件(在\ lib \ ruby下) 除了mongo和bson_ext之外,重新安装所有其他宝石 运行命令' gem install mongo -v = 1.9' 运行命令' gem install bson_ext -v = 1.9.2'
现在,尝试运行该命令,看看它是否适用于你
答案 1 :(得分:0)
这不再是Ruby 2.1的问题