Make sure your gems are installed correctly and using correct versions of sqlite. Check you have this in your Gemfile:
gem 'sqlite3', '~> 1.3.11'
Then from root of your project run
bundle install
You may also need to run this if you have not already.
rails db:create db:migrate #this is for rails >= 5
or
rake db:create db:migrate #rails <= 4.2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…