This project is archived and is in readonly mode.

#5432 ✓resolved
huacnlee (at gmail)

User mysql2 taked uninitialized constant Mysql error.

Reported by huacnlee (at gmail) | August 24th, 2010 @ 07:46 AM | in 3.0.2

hsli@hs-li:~/work/homeland$ rake db:create --trace
(in /home/hsli/work/homeland) Invoke db:create (first_time) Invoke db:load_config (first_time) Invoke rails_env (first_time) Execute rails_env Execute db:load_config Execute db:create rake aborted!
uninitialized constant Mysql
/home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active_record/railties/databases.rake:68:in rescue in rescue in create_database' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active_record/railties/databases.rake:64:inrescue in create_database' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active_record/railties/databases.rake:39:in create_database' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active_record/railties/databases.rake:33:inblock (2 levels) in ' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:636:in call' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:636:inblock in execute' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:631:in each' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:631:inexecute' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:597:in block in invoke_with_call_chain' /home/hsli/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/monitor.rb:201:inmon_synchronize' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:583:ininvoke' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2029:inblock (2 levels) in top_level' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2029:in each' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2029:inblock in top_level' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2023:intop_level' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2001:in block in run' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake.rb:1998:in run' /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/bin/rake:31:in' /home/hsli/.rvm/gems/ruby-1.9.2-p0/bin/rake:19:in load' /home/hsli/.rvm/gems/ruby-1.9.2-p0/bin/rake:19:in'



I was checked the /home/hsli/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0.rc2/lib/active_record/railties/databases.rake file line 68, is use Mysql::Error trouble is here, I've try add gem "mysql" into Gemfile, the error was not happen.
new result show me database config was not correct.

Comments and changes to this ticket

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>

Attachments

Referenced by

Pages