--- a/lib/rubygems.rb.orig	2011-11-04 14:20:28.000000000 -0400
+++ b/lib/rubygems.rb	2011-11-04 14:22:00.000000000 -0400
@@ -30,6 +30,10 @@
 require 'rbconfig'
 require "rubygems/deprecate"
 
+# HACK: this is here just for rails, see
+# http://stackoverflow.com/questions/5176782/uninitialized-constant-activesupportdependenciesmutex-nameerror
+require "thread"
+
 ##
 # RubyGems is the Ruby standard for publishing and managing third party
 # libraries.
