treasure-data / serverengine

A framework to implement robust multiprocess servers like Unicorn
Apache License 2.0
759 stars 86 forks source link

Fix loading Ruby's dll on 3.1 #116

Closed ashie closed 2 years ago

ashie commented 2 years ago

Use RbConfig::CONFIG['LIBRUBY_SO'] to find dll's path. Fix #114

Signed-off-by: Takuro Ashie ashie@clear-code.com

ashie commented 2 years ago

A test failed on Ruby 3.1:

https://github.com/treasure-data/serverengine/runs/4800297431?check_suite_focus=true

  1) ServerEngine::WinSock last_error bind error
     Failure/Error: expect(WinSock.last_error).to be Windows::Error::WSAENOTSOCK

       expected #<Integer:20077> => 10038
            got #<Integer:1> => 0

       Compared using equal?, which compares object identity,
       but expected and actual are not the same object. Use
       `expect(actual).to eq(expected)` if you don't care about
       object identity in this example.
     # ./spec/winsock_spec.rb:15:in `block (3 levels) in <top (required)>'

Hmm, it's weird. It's already fixed in latest Fiddle and merged in Ruby 3.1. In actual, it's not occur on my local environment.

Anyway, loading error described in #114 is fixed. We should investing above error in another issue or pull request.

ashie commented 2 years ago

Hmm, it's weird. It's already fixed in latest Fiddle and merged in Ruby 3.1. In actual, it's not occur on my local environment.

Anyway, loading error described in #114 is fixed. We should investing above error in another issue or pull request.

Oh, it succeeded on the merged master branch... https://github.com/treasure-data/serverengine/runs/4800870640?check_suite_focus=true