ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation \"categories\" does not exist
LINE 1: SELECT \"categories\".\"id\" FROM \"categories\" WHERE \"categories...
^
)
lib/freedom_patches/fast_pluck.rb:41:in `select_raw'
lib/freedom_patches/fast_pluck.rb:59:in `pluck'
lib/guardian/category_guardian.rb:69:in `allowed_category_ids'
app/models/tag.rb:102:in `top_tags'
app/serializers/site_serializer.rb:160:in `top_tags'
(eval):20:in `_fast_attributes'
app/models/site.rb:181:in `json_for'
app/controllers/application_controller.rb:605:in `preload_anonymous_data'
app/controllers/application_controller.rb:417:in `preload_json'
app/controllers/application_controller.rb:397:in `block in with_resolved_locale'
app/controllers/application_controller.rb:397:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:356:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:198:in `call'
您能详细说明一下您遇到的问题吗?
2 个赞
这是开发环境吗?看起来你还没有运行你的迁移?
3 个赞
有几个插件,我没做其他操作,不知道为什么会出现这种情况
ActiveRecord::StatementInvalid (PG::UndefinedTable: 错误:关系“categories”不存在 LINE 1: SELECT “categories”.“id” FROM “categories” WHERE “categories”…
ActiveRecord::StatementInvalid (PG::UndefinedTable: 错误:关系“categories”不存在
LINE 1: SELECT "categories"."id" FROM "categories" WHERE "categories"...
^
)
lib/freedom_patches/fast_pluck.rb:41:in `select_raw'
lib/freedom_patches/fast_pluck.rb:59:in `pluck'
lib/guardian/category_guardian.rb:69:in `allowed_category_ids'
app/models/tag.rb:102:in `top_tags'
app/serializers/site_serializer.rb:160:in `top_tags'
(eval):20:in `_fast_attributes'
app/models/site.rb:181:in `json_for'
app/controllers/application_controller.rb:605:in `preload_anonymous_data'
app/controllers/application_controller.rb:417:in `preload_json'
app/controllers/application_controller.rb:397:in `block in with_resolved_locale'
app/controllers/application_controller.rb:397:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:356:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:198:in `call'
这是标准安装还是其他什么?
你为什么要重复这个错误?我们可以读第一个。请不要这样做,它已经够长了。
我已将其安装在自己的服务器上