Skip to content

Commit

Permalink
Error message should advice to use 'mysql2' gem.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Neeraj Singh authored and spastorino committed Sep 22, 2010
1 parent 0cf45c8 commit 48a108d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 48a108d

Please sign in to comment.