Forum: Ruby on Rails db:create & db:migrate issues

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
18e3e6927a7e9c0eac4f77c3e36fb7fd?d=identicon&s=25 charlieb (Guest)
on 2008-12-17 01:06
(Received via mailing list)
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:in `tables'
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:in `initialize'
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:in `up'
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:in `call'
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:in `each'
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:in
`invoke_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:in
`invoke_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:in
`invoke_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:in `each'
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:in
`standard_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:in `run'
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:in `run'
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
This topic is locked and can not be replied to.