Ask A Question

Notifications

You’re not receiving notifications from this thread.

error in deploying an app based on jumpstart in Digitalocean

Stefano Tizianel asked in Gems / Libraries

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

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.