Rails Mysql2 ::错误:找不到文件?

时间:2015-05-12 14:23:47

标签: ruby-on-rails ruby mysql2

关于这是什么以及我如何解决它的任何想法?

$ rake db:migrate
== 20150512132215 RenameNotificationSubscriptions: migrating ==================
-- rename_table(:notifications_subscriptions, :video_subscriptions)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Can't find file: './railsapp_development/notifications_subscriptions.frm' (errno: 2 - No such file or directory): RENAME TABLE `notifications_subscriptions` TO `video_subscriptions`/Users/mark/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query'

1 个答案:

答案 0 :(得分:0)

我的旧表名错误@PrepareForTest(TestEnumerable.class) @Test(groups = {"LoadableBuilderTestGroup"}) public class LoadableBuilderTest extends PowerMockTestCase { private TestEnumerable mockEnumerable; @SuppressWarnings("unchecked") @BeforeMethod public void setUp() { mockEnumerable = PowerMockito.mock(TestEnumerable.class); } } 应该是notifications_subscriptions。尽管如此,还是一个奇怪的错误。