当前位置: 首页 > 知识库问答 >
问题:

Refinery博客-在Refinery::Blog::Admin::PostsController#New中出现名称错误

吕英豪
2023-03-14

完整跟踪如下

activerecord (3.2.3) lib/active_record/inheritance.rb:119:in `compute_type'
activerecord (3.2.3) lib/active_record/reflection.rb:172:in `klass'
activerecord (3.2.3) lib/active_record/associations/association.rb:202:in `raise_on_type_mismatch'
activerecord (3.2.3) lib/active_record/associations/belongs_to_association.rb:6:in `replace'
activerecord (3.2.3) lib/active_record/associations/singular_association.rb:17:in `writer'
activerecord (3.2.3) lib/active_record/associations/builder/association.rb:51:in `block in define_writers'
activerecord (3.2.3) lib/active_record/attribute_assignment.rb:85:in `block in assign_attributes'
activerecord (3.2.3) lib/active_record/attribute_assignment.rb:78:in `each'
activerecord (3.2.3) lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
activerecord (3.2.3) lib/active_record/base.rb:498:in `initialize'
refinerycms-blog (2.0.4) app/controllers/refinery/blog/admin/posts_controller.rb:36:in `new'
refinerycms-blog (2.0.4) app/controllers/refinery/blog/admin/posts_controller.rb:36:in `new'
actionpack (3.2.3) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.3) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.3) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.3) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.3) lib/active_support/callbacks.rb:481:in `block in _run__691789485813847917__process_action__570842218029846891__callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_890'
activesupport (3.2.3) lib/active_support/callbacks.rb:326:in `around'
activesupport (3.2.3) lib/active_support/callbacks.rb:310:in `_callback_around_876'
activesupport (3.2.3) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_890'
activesupport (3.2.3) lib/active_support/callbacks.rb:469:in `_run__691789485813847917__process_action__570842218029846891__callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.3) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.3) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.3) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.3) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.3) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
activerecord (3.2.3) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.2.3) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.3) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.3) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.3) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.3) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.3) lib/journey/router.rb:68:in `block in call'
journey (1.0.3) lib/journey/router.rb:56:in `each'
journey (1.0.3) lib/journey/router.rb:56:in `call'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:600:in `call'
railties (3.2.3) lib/rails/engine.rb:479:in `call'
railties (3.2.3) lib/rails/railtie/configurable.rb:30:in `method_missing'
journey (1.0.3) lib/journey/router.rb:68:in `block in call'
journey (1.0.3) lib/journey/router.rb:56:in `each'
journey (1.0.3) lib/journey/router.rb:56:in `call'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:600:in `call'
sass (3.1.16) lib/sass/plugin/rack.rb:54:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
lib/fix_soap_action_header_middleware.rb:9:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/cookies.rb:338:in `call'
dragonfly (0.9.12) lib/dragonfly/cookie_monster.rb:9:in `call'
activerecord (3.2.3) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `_run__3957069169560578947__call__3883160154977201064__callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
dragonfly (0.9.12) lib/dragonfly/middleware.rb:13:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack-contrib (1.1.0) lib/rack/contrib/runtime.rb:18:in `call'
activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.3) lib/rails/engine.rb:479:in `call'
railties (3.2.3) lib/rails/application.rb:220:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in `call'
thin (1.3.1) lib/thin/connection.rb:80:in `block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
rack (1.4.1) lib/rack/handler/thin.rb:13:in `run'
rack (1.4.1) lib/rack/server.rb:265:in `start'
railties (3.2.3) lib/rails/commands/server.rb:70:in `start'
railties (3.2.3) lib/rails/commands.rb:55:in `block in '
railties (3.2.3) lib/rails/commands.rb:50:in `tap'
railties (3.2.3) lib/rails/commands.rb:50:in `'
script/rails:6:in `require'
script/rails:6:in `'

共有1个答案

西门马鲁
2023-03-14

如果您已经在现有的rails应用程序中安装了refinery,并且带有自己的devise模型,那么您需要修改refinerycms-blog gem以引用您的devise模型。

您需要查看RefineryCMS中的第14行-blog/app/models/refinery/blog/post.rb

rake refinery:override model=refinery/blog/post

和RefineryCMS的第105行-blog/app/views/refinery/blog/admin/posts/_form.html.erb

rake refinery:override view=refinery/blog/admin/posts/_form
 类似资料:
  • Refinery CMS 是一个基于 Rails 框架开发的 CMS 系统,主要特点是模块化、可扩展、设计灵活、支持多语言,简单易用,界面清晰。 在线演示:http://demo.refinerycms.com/

  • Bootstrap为样式化Blog提供了一些不同的选项。 一些博客元素如评论框,博客文章,博客页脚等。

  • 在本章中,我们将研究如何在Drupal中Create Blogs 。 博客条目可以为网站成员公开或私有,具体取决于哪些角色有权查看内容。 以下是用于创建Drupal博客的简单步骤。 Step 1 - 单击Modules ,如以下屏幕所示。 Step 2 - 接下来,选中博客框以安装它。 启用“ Blog module ,然后单击“ Save configuration ,如以下屏幕所示。 Step

  • 问题内容: 我开始使用TypeScript编写AngularJS应用。我有这个简单的模块命令: 当我跑步时,我得到了: 我是否需要包括一些内容以使他们理解? 问候, 问题答案: 您可以通过告诉编译器“您对角度的全部了解”来简单地告诉编译器不再担心: 为了获得所有好的工具和类型检查,您需要提取Angular类型定义,以便编译器知道可用的东西。 如果您对自己喜欢的IDE使用Visual Studio或

  • 当然,我的firebase存储中已经有一个名为的文件夹。那么究竟为什么第二个桶会没有定义呢?

  • 问题内容: 我正在尝试启动并运行我的第一个TypeScript和DefinitelyTyped Node.js应用程序,并且遇到一些错误。 尝试转换简单的TypeScript Node.js页面时,出现错误“ TS2304:找不到名称’require’”。我已经阅读了Stack Overflow上多次出现此错误的信息,但我认为我没有类似的问题。我在shell提示符下运行命令: 该文件的内容是: 错