rails db:migrate failed'[MODEL] .users'不存在:SHOW FULL FIELDS FROM`users` [英] rails db:migrate fails '[MODEL].users' doesn't exist: SHOW FULL FIELDS FROM `users`

查看:229
本文介绍了rails db:migrate failed'[MODEL] .users'不存在:SHOW FULL FIELDS FROM`users`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了很多谷歌搜索和阅读了很多堆栈溢出页面,但无法解决这个问题。如果有人可以帮助,这将是有帮助的。



我的应用程序昨天工作正常,现在突然开始给rake db:migrate / p>

我检查我的方案很好,我尝试过rake db:drop / db:create / db:migrate,我检查了宝石文件中的设计。



我的错误:





我的模式:





我的宝石档案:





任何帮助将非常有用。



谢谢。



错误为文本:



Senthil:Zenkars senthilkumar $ rake db:migrate
rake aborted!
Mysql2 ::错误:表'zenkars_development.users'不存在:SHOW FULL FIELDS FROM users



任务:TOP => db:migrate =>环境



(使用--trace运行任务查看完整跟踪)



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



**调用db:migrate(first_time)



**调用环境(first_time)



**调用disable_rails_admin_initializer(first_time)



**执行disable_rails_admin_initializer



**执行环境



rake aborted!



Mysql2 ::错误:表'zenkars_development.users'不存在:SHOW FULL FIELDS FROM users
/ usr / local /窖/红宝石/ 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:在`query'

解决方案

查看此链接



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



基本上您需要从用户模型中删除rails_admin配置,并将其以不推荐的方式写入。


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'

解决方案

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.

这篇关于rails db:migrate failed'[MODEL] .users'不存在:SHOW FULL FIELDS FROM`users`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆