aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-20 23:40:48 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-20 23:40:48 +0000
commit0d5a7d1d8c921c3f34f52d3e188de11cff0964e9 (patch)
tree1b1187e5a1d327ebb976525ccec2a0a52299dee6 /activerecord/lib/active_record/connection_adapters
parent1373991dd8feacb0c09a6115a271777810807668 (diff)
downloadrails-0d5a7d1d8c921c3f34f52d3e188de11cff0964e9.tar.gz
rails-0d5a7d1d8c921c3f34f52d3e188de11cff0964e9.tar.bz2
rails-0d5a7d1d8c921c3f34f52d3e188de11cff0964e9.zip
Stress that you should really install the C-based MySQL library when running on the pure Ruby one (closes #9507)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rwxr-xr-xactiverecord/lib/active_record/connection_adapters/mysql_adapter.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
index 20028ffcfd..9c55c51f46 100755
--- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -49,6 +49,11 @@ module ActiveRecord
rescue LoadError => cannot_require_mysql
# Use the bundled Ruby/MySQL driver if no driver is already in place
begin
+ ActiveRecord::Base.logger.info(
+ "WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. " +
+ "Please install the C-based MySQL library instead (gem install mysql)."
+ ) if ActiveRecord::Base.logger
+
require 'active_record/vendor/mysql'
rescue LoadError
raise cannot_require_mysql