title: Getting error while installing mongoid gem using Rails 3
body: <p>I am getting the following error while run <code>bundle install</code> after adding the <code>gem 'mongoid', '2.0.0.beta.19'</code> and <code>gem 'bson_ext'</code> .</p>
  
  <p>Error:</p>
  
  <pre><code> Gem::Installer::ExtensionBuildError: 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.12.1 for inspection.
  Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-1.12.1/ext/cbson/
  gem_make.out
  An error occurred while installing bson_ext (1.12.1), and Bundler cannot
  continue.
  Make sure that `gem install bson_ext -v '1.12.1'` succeeds before bundling.
  </code></pre>
  
  <p>Error-2:</p>
  
  <pre><code>C:\Site\mongo_blog&gt;gem install bson_ext -v '1.12.1'
  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 -r ./siteconf20150414-3752-177v4w2.rb 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  clean
  Makefile:165: *** target pattern contains no `%'.  Stop.
  
  make
  Makefile:165: *** target pattern contains no `%'.  Stop.
  
  make failed, exit code 2
  
  Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-
  1.12.1 for inspection.
  Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/bs
  on_ext-1.12.1/gem_make.out
  </code></pre>
  
  <p>My Gemfile is as follows.</p>
  
  <h1>Gemfile:</h1>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.19'
  
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  
  gem 'sqlite3'
  
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.3'
    gem 'coffee-rails', '~&gt; 3.2.1'
  
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer', :platforms =&gt; :ruby
  
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  
  # To use ActiveModel has_secure_password
  # gem 'bcrypt-ruby', '~&gt; 3.0.0'
  
  # To use Jbuilder templates for JSON
  # gem 'jbuilder'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Deploy with Capistrano
  # gem 'capistrano'
  
  # To use debugger
  # gem 'debugger'
  gem 'mongoid', '2.0.0.beta.19'
  gem 'bson_ext'
  </code></pre>
  
  <p>Please help me resolve this error.</p>