undefined method `init' for Mysql:Class error
Hi,
I'm trying to set up just a basic blog on my webhost so I can just get everything working before I do more but I keep getting this error when I go add tables to the database via command line:
Ankit-Desais-MacBook-Pro:mogo ankit$ rake db:migrate --trace
(in /Users/ankit/Sites/mogo)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
undefined method `init' for Mysql:Class
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/mysql_adapter.rb:30:in `mysql_connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:226:in `send'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:226:in `new_connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:248:in `checkout_new_connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `checkout'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `loop'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `checkout'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `checkout'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:99:in `connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:330:in `retrieve_connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in `retrieve_connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_specification.rb:95:in `connection'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:459:in `initialize'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:406:in `new'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:406:in `up'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:388:in `migrate'
/Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/railties/databases.rake:140
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Anyone faced this issue before? There was another thread about this but no one answered it and it's been closed.
Thanks in advance,
Ankit
Subject
Written By
Posted
undefined method `init' for Mysql:Class error
July 13, 2010 09:37PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.