rake db:migrate 不起作用(Rails 4.0.4) [英] rake db:migrate doesn't work (Rails 4.0.4)

查看:47
本文介绍了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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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