Creating the database in the demo video

Hi,

In the 7 minute demo video, the migration for the sqllite database proceeds without error.  I followed the same steps, except chose a mysql database.

However, when the migration step completes, there's an error that the database doesn't exist:

C:\Ruby\bin\ruby.exe -e "STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)" C:\Ruby\bin/rake db:migrate
(in C:/Users/DC/RubymineProjects/notebook)
rake aborted!
Unknown database 'notebook_development'
(See full trace by running task with --trace)
Process finished with exit code 1

Do the actual databases have to be created manually before running the migration?  The purpose of the migration is to create the tables, correct?

Does mysql have to be running at this point?




This is fun.  It's a bit of a challenge translating the instructions from my Intro Ruby course for RubyMine use, but it's worth it.

2 comments
Comment actions Permalink

Yes, in case of mysql you should create db tables: notebook_development, notebook_production(for production mode), notebook_tests(for tests with fixtures). You may just execute "db:create:all" rake tasks (open dialog: RM | Tools | Run Rake Tasks.. and type "create")

Although Help guide isn't completed for RubyMine but it contains a lot of useful information. E.g I recommend you to look through RM | Help | Help Topics | Getting Started With RubyMine | Create and Run Your First Project

0
Comment actions Permalink

>>Run Rake Tasks...db:create:all<<

Yep, that worked, thanks Roman.



Regards,

0

Please sign in to leave a comment.