I am in chapter 8.4.1, after generating a migration I tried running:
$ bundle exec rake db:migrate
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::BusyException: database is locked:
#followed by a long list of paths/filenames and line numbers...
rails console --sandbox
In your terminal console type (making sure you are in your Rails app directory):
$ ps aux
Then you should see a list of processes, amongst them something similar to:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ubuntu 49527 0.0 0.0 482924 620 ? Sl Jan29 0:00 rails_console --sandbox
Take a note of the
PID, in this case
49527, then run the following in the command line:
$ kill 49527
Now running your migration
$ bundle exec rake db:migrate should work.