I have very strange problem on heroku. I have view that looks like this:
= content_for :header_title do
= t('.header_title')
- if @appointments.exists?
%table.table.table-striped.table-bordered.table-hover
%thead
%tr
%th= t('.id')
%th= t('.athena_health_id')
%th= t('.start_time')
%th= t('.duration')
%th= t('.provider')
%th= t('.created_at')
%th= t('.updated_at')
%tbody
= render @appointments
= paginate @appointments
- else
%h3.text-center= t('.appointments_not_found')
%hr/
Nothing special. When I visit page that is using this template on heroku i receive:
ActionView::Template::Error (undefined method `silence' for #<Logger:0x007f7a86267a70>):
Spec are passing. On my local everything is working fine. I don't know what is going on. Stacktrace is showing that the problem is following line:
= paginate @appointments
I'm using Rails 5.0 and kaminari (1.0.0.alpha). Any ideas?
Edit: In my production.rb I have:
if ENV['RAILS_LOG_TO_STDOUT'].present?
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
end
config.log_formatter = ::Logger::Formatter.new
Logger
. Does your code have aLogger
class or is that on Heroku's end? – Circlesilence
method of::Logger
class was deprecated since Rails4.2 and it was removed from Rails5. – Brandes