god icon indicating copy to clipboard operation
god copied to clipboard

god cannot be used with Ruby 3.1+

Open mishina2228 opened this issue 4 years ago • 4 comments

Condition:

  • Using Ruby: 3.1+

OR

  • Using timeout 0.2.0+

I'm using Ruby 3.0.2 and timeout 0.2.0. (Default is 0.1.1, but I've updated it.) refs: https://github.com/mojombo/god/pull/262#issuecomment-1177217771

E [2022-01-09 00:31:15] ERROR: Unhandled exception in ProcessRunning condition - (NoMethodError): undefined method `timeout' for God::System::SlashProcPoller:Class
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/system/slash_proc_poller.rb:64:in `readable?'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/system/slash_proc_poller.rb:18:in `block in usable?'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/system/slash_proc_poller.rb:17:in `all?'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/system/slash_proc_poller.rb:17:in `usable?'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/system/process.rb:6:in `fetch_system_poller'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/system/process.rb:15:in `initialize'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/conditions/process_running.rb:46:in `new'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/conditions/process_running.rb:46:in `test'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/task.rb:367:in `handle_poll'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/driver.rb:64:in `handle_event'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/driver.rb:181:in `block (2 levels) in initialize'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/driver.rb:179:in `loop'
/home/owner/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/god-0.13.7/lib/god/driver.rb:179:in `block in initialize'

#262 will solve this problem.

mishina2228 avatar Jan 09 '22 01:01 mishina2228

Hi @mishina2228, This fix was merged on May 2, 2023. We are planning to use this gem with Ruby 3.2.2. Considering the issue is still in an open state, should I consider it resolved and proceed? Or are there any aspects you are still examining?

Rajesh1213 avatar Feb 06 '24 14:02 Rajesh1213

@Rajesh1213 I assume that you are talking about https://github.com/abak-press/god/pull/3, but it's a forked project and has nothing todo with this project.

mishina2228 avatar Feb 06 '24 15:02 mishina2228

Oh, my bad. It was a mention. I wrongly understood the mention as merged. @mishina2228

Rajesh1213 avatar Feb 07 '24 12:02 Rajesh1213

A forked version of this gem has been released, resurrected_god, with homepage https://github.com/mishina2228/resurrected_god. It's a drop-in replacement for god which includes this fix and supports ruby 3.1.

bshand avatar Jun 27 '24 12:06 bshand