jjzjj

SubclassNotFound

全部标签

ruby-on-rails - ActiveRecord::SubclassNotFound

我正在尝试将我的redmine从1.3.0升级到2.0.0,但我遇到了数据库迁移问题。当我运行命令时:rakedb:migrateRAILS_ENV=production它显示了类似这样的错误rakeaborted!uninitializedconstantRAILS_ENV我的错误日志是:ActiveRecord::SubclassNotFound(Thesingle-tableinheritancemechanismfailedtolocatethesubclass:'GoogleAppsAuthSource'.Thiserrorisraisedbecausethecolumn't

ruby-on-rails - 单表继承在 Rails 4 应用程序中不起作用 - ActiveRecord::SubclassNotFound:单表继承机制失败

我有一个新的Rails4应用程序,我在STI配置中创建了一些模型。主要模型称为Order,它继承自ActiveRecord::Base。这是它的样子:classOrder{where(type:'remote')}scope:locals,->{where(type:'local')}end另外两个模型位于models/orders的文件夹中,它们分别称为Remote和Local,它们都继承自顺序订单迁移文件如下所示:defchangecreate_table:ordersdo|t|t.string:source_url,null:falset.string:final_url,nul