Added support for binary gems.
diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock
index 8599da7..2c030dd 100644
--- a/ruby/Gemfile.lock
+++ b/ruby/Gemfile.lock
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    google-protobuf (3.0.0.alpha.4.0)
+    google-protobuf (3.0.0.alpha.5.0)
 
 GEM
   remote: https://rubygems.org/
@@ -25,4 +25,4 @@
   test-unit
 
 BUNDLED WITH
-   1.10.6
+   1.11.2
diff --git a/ruby/Rakefile b/ruby/Rakefile
index c25103d..44497de 100644
--- a/ruby/Rakefile
+++ b/ruby/Rakefile
@@ -21,6 +21,11 @@
     ext.ext_dir = "ext/google/protobuf_c"
     ext.lib_dir = "lib/google"
   end
+
+  task 'gem:windows' do
+    require 'rake_compiler_dock'
+    RakeCompilerDock.sh "bundle && rake cross native gem"
+  end
 end
 
 Gem::PackageTask.new(spec) do |pkg|
diff --git a/ruby/lib/google/protobuf.rb b/ruby/lib/google/protobuf.rb
index f0eb626..62bdd1b 100644
--- a/ruby/lib/google/protobuf.rb
+++ b/ruby/lib/google/protobuf.rb
@@ -44,7 +44,11 @@
   require 'json'
   require 'google/protobuf_java'
 else
-  require 'google/protobuf_c'
+  begin
+    require "google/#{RUBY_VERSION.sub(/\.\d$/, '')}/protobuf_c"
+  rescue LoadError
+    require 'google/protobuf_c'
+  end
 end
 
 require 'google/protobuf/repeated_field'