diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-29 09:41:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-29 11:09:37 -0700 |
commit | 146474256cf2f09f9706980032688b2c7d484e24 (patch) | |
tree | 096a286feeb7bf7e565c1f7de3ba9ad3174f48d0 /activerecord | |
parent | 00f030c6e107f92fc9ef13a8c77e31b5e5299e6e (diff) | |
download | rails-146474256cf2f09f9706980032688b2c7d484e24.tar.gz rails-146474256cf2f09f9706980032688b2c7d484e24.tar.bz2 rails-146474256cf2f09f9706980032688b2c7d484e24.zip |
lean on rubygems to provide error messages about missing gems
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 1fd286622b..07608ea6a7 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -3,15 +3,8 @@ require 'active_support/core_ext/kernel/requires' require 'active_support/core_ext/object/blank' require 'set' -begin - require 'mysql' -rescue LoadError - raise "!!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql'" -end - -unless defined?(Mysql::Result) && Mysql::Result.method_defined?(:each_hash) - raise "!!! Outdated mysql gem. Upgrade to 2.8.1 or later. In your Gemfile: gem 'mysql', '2.8.1'. Or use gem 'mysql2'" -end +gem 'mysql', '~> 2.8.1' +require 'mysql' class Mysql class Time |