aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-01-22 06:28:49 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-01-22 06:28:49 +0000
commitcffd1a9c3ac74dfd45dfef573b8592408f83481c (patch)
tree08cba76a70eba0027f37e4bd0d666a3c31d3797a /activerecord/lib/active_record/connection_adapters
parentea30f7353be3a977c5ea50d8efaa02acf26dd133 (diff)
downloadrails-cffd1a9c3ac74dfd45dfef573b8592408f83481c.tar.gz
rails-cffd1a9c3ac74dfd45dfef573b8592408f83481c.tar.bz2
rails-cffd1a9c3ac74dfd45dfef573b8592408f83481c.zip
Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/db2_adapter.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
index 7e3627261a..515444a21e 100644
--- a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
@@ -219,4 +219,12 @@ begin
end
rescue LoadError
# DB2 driver is unavailable.
+ module ActiveRecord # :nodoc:
+ class Base # :nodoc:
+ def self.db2_connection(config) # :nodoc:
+ # Set up a reasonable error message
+ raise LoadError, "DB2 Libraries could not be loaded."
+ end
+ end
+ end
end