sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.23k stars 571 forks source link

Update thin version #530

Closed mockdeep closed 1 year ago

mockdeep commented 1 year ago

Version 1.5.x no longer works on Ruby 3.2:

/home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:104:in `block in initialize': uninitialized constant Thin::Server::Fixnum (NameError)
17:11:39 mail.1            | 
17:11:39 mail.1            |         when Fixnum, /^\d+$/ then port    = arg.to_i
17:11:39 mail.1            |              ^^^^^^
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:102:in `each'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:102:in `initialize'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:145:in `new'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:145:in `start'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:190:in `block (2 levels) in run!'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:189:in `block in run!'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/bin/mailcatcher:25:in `load'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/bin/mailcatcher:25:in `<main>'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/bin/ruby_executable_hooks:22:in `eval'
17:11:39 mail.1            |    from /home/fletch/.asdf/installs/ruby/3.2.0/bin/ruby_executable_hooks:22:in `<main>'
sj26 commented 1 year ago

Please see https://github.com/sj26/mailcatcher/pull/496#issuecomment-1173216482

Has anybody tried the beta?

dirkdk commented 1 year ago

Please see #496 (comment)

Has anybody tried the beta?

yes i tried, via gem install --pre mailcatcher. It still has a requirement on thin-1.5.1, which still causes problems with ruby 3.2 (see OP error)

sj26 commented 1 year ago

Yeah the new version doesn't update thin, but it updates the dependency that was blocking the update of thin. The websocket implementation has been swapped out. I need to make sure that receiving mail, realtime updates, and shutdown are all functioning correctly. Then I can release 0.9.0 more widely. If it doesn't receive issues, then I'll do a 0.10.0 with thin bumped.

overture8 commented 1 year ago

Tried gem install --pre mailcatcher and still seeing the issue in Ruby 3.2.

sj26 commented 1 year ago

@overture8 did you try the mailcatcher preview on ruby < 3.2?

sj26 commented 1 year ago

I have pushed another pre-release, v0.9.0.beta2, which relaxes the thin requirement and should support ruby 3.2. Please try it:

gem install mailcatcher --pre
overture8 commented 1 year ago

I have pushed another pre-release, v0.9.0.beta2, which relaxes the thin requirement and should support ruby 3.2. Please try it:

gem install mailcatcher --pre

Perfect - it seems to be working for me after updating to 0.9.0.beta2 👌