diff --git a/lib/active_record/connection_adapters/h2_adapter.rb b/lib/active_record/connection_adapters/h2_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record/connection_adapters/h2_adapter.rb
+++ b/lib/active_record/connection_adapters/h2_adapter.rb
@@ -1 +1,13 @@
-require 'active_record/connection_adapters/jdbc_adapter'
\ No newline at end of file
+tried_gem = false
+begin
+  require "jdbc/h2"
+rescue LoadError
+  unless tried_gem
+    require 'rubygems'
+    gem "jdbc-h2"
+    tried_gem = true
+    retry
+  end
+  # trust that the hsqldb jar is already present
+end
+require 'active_record/connection_adapters/jdbc_adapter'
Needed this to get h2 to load properly form simple script (w/o gem installed)