1

I'm learning Ruby on Rails from lynda.com. I just made mysql database and now I'm trying to configure my rails project so it can connect to that database, but no matter what I try, I always hit this error after trying to rake db:schema:dump:

Kards52Proof$ rake db:schema:dump --trace
** Invoke db:schema:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:schema:dump
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: No database selected: SHOW TABLE

I'm at a lost here... why does ActiveRecord::StatementInvalid: Mysql2::Error: No database selected: SHOW TABLE keep occurring?

Knut Holm
  • 3,988
  • 4
  • 32
  • 54

1 Answers1

0

Looking at the source for rake db:schema:dump here I'd make the assumption that the database hasn't been created yet. Here's a guide on doing so. Try running it after the setup.

Community
  • 1
  • 1
Yeysides
  • 1,262
  • 1
  • 17
  • 27