I have an application build with Rails 5.0.0. I can deploy the application normaly to Heroku, without erros. I configurated an Lightsail with Ubuntu 16.04 LTS and I instaled dokku. The applicaiton already run on another amazon server (EC2 with Ubuntu 16.04 LTS), but the process of deploy on there it's weird, thats why I changing it to another server with dokku. When I run git push dokku, the process starts, but at the end of it I get the error bellow.
CHECKS file not found in container: Running simple container check...
-----> Waiting for 10 seconds ...
d09da8aad3ecbd6b62b189bd74b3d35c9d1b11c4a4a06e6a063687b7e4ae60fb
remote: App container failed to start!!
=====> 99aulas web container output:
=> Booting Puma
=> Rails 5.0.7.2 application starting in production on http://0.0.0.0:5000
=> Run `rails server -h` for more startup options
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.0.7.2/lib/active_support/concern.rb:126:in `included': Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)
from /app/app/models/models/concerns/productable.rb:5:in `<module:Productable>'
from /app/app/models/models/concerns/productable.rb:1:in `<top (required)>'
But this code already run on another two servers without the same error. In the file that is mentioned on the log I have the code bellow:
model Productable
extend ActiveSupport::Concern
included do
extend FriendlyId
include PgSearch
before_validation :update_slug, on: :update, prepend: true
acts_as_paranoid
has_one :highlight, as: :highlightable, dependent: :destroy
scope :published, -> { joins(:teacher).where(status: PublishStatus::PUBLIC) }
scope :draft, -> { where(status: PublishStatus::DRAFT) }
scope :from_category_group, -> category_group { joins(category: :category_group).where("category_groups.slug = ?", category_group) }
scope :from_category, -> category { joins(:category).where("categories.slug = ?", category) }
scope :from_teacher, -> teacher_id { where(teacher_id: teacher_id) }
scope :highlighted, -> { joins(:highlight) }
pg_search_scope :search,
associated_against: {
category_group: :name,
category: :name,
teacher: :name
},
against: [:title, :description, :keywords],
ignoring: :accents,
using: {
tsearch: { prefix: true }
}
end
def update_slug
#force update slug only if title changed
self.slug = nil if self.title_changed?
end
end
Someone knows whats it can be?
Thanks!!