rails db:migrate fails '[MODEL].users' doesn't exist: SHOW FULL FIELDS FROM `users`

故事扮演 提交于 2019-12-13 03:54:20

问题


I done lot of googling and read lot of stack overflow pages , but can't fix this issues. If any one can help with this , it will be helpful.

My app works fine still yesterday , now suddenly it starts to give error on "rake db:migrate"

I check my scheme its fine , i tried after rake db:drop / db:create / db:migrate , i checked for devise in Gem file.

My Error :

My Schema :

My Gem File :

Any help will be very use ful.

Thanks.

Error as Text :

Senthil:zenkars senthilkumar$ rake db:migrate rake aborted! Mysql2::Error: Table 'zenkars_development.users' doesn't exist: SHOW FULL FIELDS FROM users

Tasks: TOP => db:migrate => environment

(See full trace by running task with --trace)

Senthil:zenkars senthilkumar$ rake db:migrate --trace

** Invoke db:migrate (first_time)

** Invoke environment (first_time)

** Invoke disable_rails_admin_initializer (first_time)

** Execute disable_rails_admin_initializer

** Execute environment

rake aborted!

Mysql2::Error: Table 'zenkars_development.users' doesn't exist: SHOW FULL FIELDS FROM users /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'


回答1:


Check this link out

https://github.com/sferik/rails_admin/issues/1273

Basically you need to remove rails_admin configuration from user model and write it as the deprecated way.



来源:https://stackoverflow.com/questions/12636355/rails-dbmigrate-fails-model-users-doesnt-exist-show-full-fields-from-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!