Stefano Tizianel

Joined

150 Experience
1 Lesson Completed
0 Questions Solved

Activity

During the deployment phase on a Digitalocean app service I have this log:

[tirzan-3] [2021-09-14 08:16:02] => Booting Puma
[tirzan-3] [2021-09-14 08:16:02] => Rails 6.1.4.1 application starting in production
[tirzan-3] [2021-09-14 08:16:02] => Run bin/rails server --help for more startup options
[tirzan-3] [2021-09-14 08:16:05] Exiting
[tirzan-3] [2021-09-14 08:16:05] /layers/heroku_ruby/gems/vendor/bundle/ruby/3.0.0/gems/madmin-1.2.0/lib/madmin/resource.rb:152:in rescue in field_for_type': Couldn't find attribute or association 'published_at' with type '' on Announcement model (ArgumentError)
[tirzan-3] [2021-09-14 08:16:05]
[tirzan-3] [2021-09-14 08:16:05] To fix this, either:
[tirzan-3] [2021-09-14 08:16:05]
[tirzan-3] [2021-09-14 08:16:05] 1. Remove 'attribute published_at' from app/madmin/resources/announcement_resource.rb
[tirzan-3] [2021-09-14 08:16:05] 2. Or add the missing attribute or association to the Announcement model
[tirzan-3] [2021-09-14 08:16:05] from /layers/heroku_ruby/gems/vendor/bundle/ruby/3.0.0/gems/madmin-1.2.0/lib/madmin/resource.rb:90:in
field_for_type'
[tirzan-3] [2021-09-14 08:16:05] from /layers/heroku_ruby/gems/vendor/bundle/ruby/3.0.0/gems/madmin-1.2.0/lib/madmin/resource.rb:36:in attribute'
[tirzan-3] [2021-09-14 08:16:05] from /workspace/app/madmin/resources/announcement_resource.rb:4:in
class:AnnouncementResource'
[tirzan-3] [2021-09-14 08:16:05] from /workspace/app/madmin/resources/announcement_resource.rb:3:in <main>'
[tirzan-3] [2021-09-14 08:16:05] from /layers/heroku_ruby/gems/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in
require'

It seems that attributes
# Attributes
attribute :id, form: false
attribute :published_at
attribute :announcement_type
attribute :name
attribute :description
attribute :created_at, form: false
attribute :updated_at, form: false

are in conflict with the model

Thank's in advance
Best Regards
Stefano Tizianel

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.