rake db:migrate 不起作用(Rails 4.0.4)

编程入门 行业动态 更新时间:2024-10-28 21:14:23
本文介绍了rake db:migrate 不起作用(Rails 4.0.4)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 Rails 4.0.4/Ruby 2.1.0 上有一个新应用.我做的第一件事是添加 Devise gem.当我想运行 rake db:migrate 时,它​​什么也不做.没有错误,但没有执行迁移.

I have a new app on Rails 4.0.4 / Ruby 2.1.0. The first thing I did was adding Devise gem. When I want to run rake db:migrate, it just does nothing. No error, but the migration isn't executed.

你能帮我处理这个案子吗?我找不到问题出在哪里.

Could you please help me what to do with this case? I can't find where is the problem.

谢谢!彼得

推荐答案

好的,所以问题是设计生成器生成了带有迁移的.txt"文件而不是.rb"文件.奇怪,但更改扩展名解决了它.

OK, so the problem was that Devise generator generated ".txt" file with migration instead of ".rb" file. Strange, but changing extension solved it.

更多推荐

rake db:migrate 不起作用(Rails 4.0.4)

本文发布于:2023-10-22 20:52:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1518682.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不起作用   db   rake   migrate   Rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!