Closed lepek closed 8 years ago
@lepek As far as I understand this is not a problem of sidekiq_status. The problem here is that sidekiq_status uses ERB with default settings with enabled trim mode to omit blank lines. Due to some reason in your setup the default ERB mode excludes omit blank lines ending in -%?>
modifier, so ERB just fails.
Really there is no strong reason for sidekiq_status to expect such trim mode except for generating more concise output so fixing this should be pretty trivial. However you should rather lookup your code and see what changes ERB trim mode from the default one and whether it is really required.
PS. I believe somebody has reported something similar before, but I cannnot just find this issue now, sorry.
The only thing I can imagine is that some gem is changing the default ERB trim mode, I am not doing it in the app. I will double check. It is the only part in the Sidekiq Web UI that has this issue. I am using rails_api which has some special handling of some of the view libraries, I don't know if that can be the reason. There is a similar issue from 2014 which was solved, according to the reporter, updating Sidekiq. There was also this issue in Sidekiq: https://github.com/mperham/sidekiq/issues/1736
Just for the record, I fixed it money patching the Sidekiq's class. Not the most elegant.
module Sidekiq
class Web < Sinatra::Base
set :erb, { trim: '-' }
end
end
@lepek BTW try master branch. It includes 486c0baf0b08044f632317de5dc0ec027847c45e which removes the whitespace trimming.
Using Sidekiq 4.1.1 and sidekiq_status 1.1.0, when I go to statuses in the Sidekiq Web, I get this error: