简体   繁体   中英

Mysql2::Error: Table doesn't exist: SHOW FULL FIELDS FROM `sessions`

I just cloned an application from my developer and I want to set it up on my computer. I get this error when I go to localhost:3000 , and I don't really understand what it means.

Error:

ActiveRecord::StatementInvalid - Mysql2::Error: Table 
'goacquire_development.sessions' doesn't exist: SHOW FULL FIELDS FROM `sessions`:

I think it could be my installation process, I'll appreciate if someone could explain this error to me.

A few ideas:

  1. Make sure MySQL is running on your local machine.
  2. Make sure you have run rake db:create and rake db:migrate .
  3. Make sure you have a database.yml file configured with MySQL settings.

Hope this helps.

  • Install MySQL server on your machine
  • Config database.yml (Create new if your app don't have.)
  • Run commands:
 # cd /path/to/your/app # bundle install # rake db:create # rake db:migrate # rails s 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM