Error message should advice to use 'mysql2' gem.
If I create a new app using command rails new demo -d mysql then Gemfile contains 'mysql2' gem by default. However if mysql gem is missing then error message says raise "!!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql', '2.8.1'" [#5569 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
parent
0cf45c850c
commit
48a108d55b
@ -19,11 +19,11 @@ def self.mysql_connection(config) # :nodoc:
|
||||
begin
|
||||
require 'mysql'
|
||||
rescue LoadError
|
||||
raise "!!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql', '2.8.1'"
|
||||
raise "!!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql2'"
|
||||
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'"
|
||||
raise "!!! Outdated mysql gem. Upgrade to 2.8.1 or later. In your Gemfile: gem 'mysql', '2.8.1'. Or use gem 'mysql2'"
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user