我将项目从红宝石栏杆改为jruby栏杆。当我执行jruby -S rake db:setup
时,我收到此错误:
-- initialize_schema_migrations_table()
-> 0.0212s
rake aborted!
ActiveRecord::StatementInvalid: ActiveRecord::JDBCError: org.postgresql.util.PSQLException: ERROR: column "version" does not exist
我在谷歌寻找解决方案,但我找不到任何东西。我必须指出,在jruby之前一切都还可以。我可以进行迁移等。
答案 0 :(得分:0)
好的,我找到了解决方案。问题出在schema_migrations中。没有列'版本'。
在rails控制台
ActiveRecord::Base.connection.execute("DROP TABLE schema_migrations")
下
rake db:setup