Reputation: 1
I just started mining. while i'm trying to setup (and follow the instructions to do that, command - rake db:migration) following error occurred. The article i followed http://angular-rails.com/bootstrap.html
"Mysql2::Error: Table 'amweb_development.schema_migrations' doesn't exist: SELECT schema_migrations
.* FROM schema_migrations
"
Can i re-configure mysql2 ? will that solve my problem? or is there any other way, i don't have any data in my database, so i can recreate everything.
Please advice. Thanks in advance.
Upvotes: 0
Views: 6233
Reputation: 4973
How is your database.yml file setup? I had this same problem and it was due to using a database other than the standard production, test, and development. You can create the schema_migrations table yourself, or you can do it with a rake task. The key if you are using rake is to specify the environment (essentially the name of your database).
if your database.yml file has an entry like such:
amweb_development:
adapter: mysql2
host: localhost
database: amweb_development
then the rake task to setup the database (including the schema migrations table) would be:
rake db:setup RAILS_ENV=amweb_development
Upvotes: 1