Db:create & db:migrate issues


#1

Greetings:

I am new to ROR and RadRails. All assistance will always be
appreciated.

My environment:

Windows XP
Ruby 1.8.6
Rails 2.2.2
Aptana Studio, build: 1.2.1.020234
RadRails 1.1.0.200812081651NGT

I created a new ROR Project.

When I attempted to run db:create --trace for the first time I got the
following message:

in C:/RailsApp/chbdepot)
** Invoke db:create (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:create

RadRails did not create chbdepot_development.

I then created chbdepot_development manually and re-ran db:create –
trace. I got the following message:

rake db:create --trace
(in C:/RailsApp/chbdepot)
** Invoke db:create (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:create
chbdepot_development already exists

This is correct because I created the db manually.

I then ran:

rake db:migrate --trace
(in C:/RailsApp/chbdepot)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
undefined method each' for #<Mysql:0x490d1bc> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/mysql_adapter.rb:414:intables’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/schema_statements.rb:330:in
initialize_schema_migrations_table' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ migration.rb:430:ininitialize’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
migration.rb:394:in new' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ migration.rb:394:inup’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
migration.rb:377:in migrate' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 111 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:incall’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:ininvoke_with_call_chain’
c:/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:ininvoke_with_call_chain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:ininvoke_task’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
c:/ruby/bin/rake:16:in `load’
c:/ruby/bin/rake:16

Thanks,
Charlie