Install this gem to use H2 with JRuby on Rails.
Nick Sieger, Ola Bini and JRuby contributors
gem "activerecord-jdbch2-adapter", "~> 1.2.0"