This project is archived and is in readonly mode.
"uninitialized constant Mysql" during rake db:create using em_mysql2
Reported by Sam Aarons | August 26th, 2010 @ 08:35 AM
When rake db:create is run using the em_mysql2 adapter, Rails wrongly assumes it is suppose to throw a Mysql::Error instead of a Mysql2::Error. I have attached a patch that fixes this problem.
rake aborted!
uninitialized constant Mysql
~/.bundler/ruby/1.9.1/rails-5dd9272/activerecord/lib/active_record/railties/databases.rake:64:in `rescue in create_database'
~/.bundler/ruby/1.9.1/rails-5dd9272/activerecord/lib/active_record/railties/databases.rake:39:in `create_database'
~/.bundler/ruby/1.9.1/rails-5dd9272/activerecord/lib/active_record/railties/databases.rake:35:in `block (2 levels) in <top (required)>'
/usr/local/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/local/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/local/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/local/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/local/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/local/bin/rake:31:in `<main>'
Comments and changes to this ticket
-
Rohit Arondekar August 27th, 2010 @ 02:29 PM
- Assigned user set to José Valim
- Importance changed from to Low
-
José Valim August 28th, 2010 @ 02:42 PM
- State changed from new to committed
-
viktor tron (strawberry) January 12th, 2011 @ 02:28 PM
it seems this problem persists in that the adapter still requires the mysql gem?
The only way I could avoid this was putting
gem 'mysql'
gem 'mysql2'
in my Gemfileis this normal?
-
Goksel January 18th, 2011 @ 01:32 AM
- Assigned user cleared.
This can be a Mysql version problem. You should install the most stable version (MYSQL 5.1). See me blog post : http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-o...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>