Closed aledustet closed 6 years ago
The issue was that the clock.rb files content was not 'namespaced':
include Clockwork
every(1.hour, ...
...
After moving it under the module the problem was solved:
module Clockwork
every(1.hour, ...
end
I'm closing it 👍
@aledustet I still get this error all the time, using clockwork 2.0.2, haml 5.0.4 and temple 0.8.0. Was this fixed anywhere?
@jemminger I currently have
@aledustet I upgraded to clockwork 2.0.3, still getting it:
RuntimeError: Unsupported callback newline (Most recent call first)
File /app/vendor/bundle/ruby/2.5.0/gems/clockwork-2.0.3/lib/clockwork/manager.rb line 44 in on
File /app/vendor/bundle/ruby/2.5.0/gems/clockwork-2.0.3/lib/clockwork.rb line 38 in on
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 86 in dispatcher
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 49 in compile
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 7 in block in on_multi
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 7 in each
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 7 in on_multi
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 84 in dispatcher
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 49 in compile
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/mixins/dispatcher.rb line 45 in call
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/engine.rb line 50 in block in call
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/engine.rb line 50 in each
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/engine.rb line 50 in inject
File /app/vendor/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/engine.rb line 50 in call
File /app/vendor/bundle/ruby/2.5.0/gems/haml-5.0.4/lib/haml/temple_engine.rb line 41 in compile
File /app/vendor/bundle/ruby/2.5.0/gems/haml-5.0.4/lib/haml/engine.rb line 61 in initialize
File /app/vendor/bundle/ruby/2.5.0/gems/haml-5.0.4/lib/haml/plugin.rb line 16 in new
File /app/vendor/bundle/ruby/2.5.0/gems/haml-5.0.4/lib/haml/plugin.rb line 16 in compile
File /app/vendor/bundle/ruby/2.5.0/gems/haml-5.0.4/lib/haml/plugin.rb line 23 in call
After my upgrade to rails 5.1 i am seeing this warning
When i upgrade the haml gem the template handler changes and the deprecation warning with it but it brings the temple gem and with it this runtime error:
The callback method is also code. Here is the line that is throwing the error https://github.com/Rykian/clockwork/blob/v2.0.2/lib/clockwork/manager.rb#L44