You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error in Windows due to using net-http-persistent #124
The net-http-persistent gem doesn't run on windows due to it relying on unix functions. Stripe had the same issue and chose to workaround it by falling back on net_http.
Thanks for bringing this to our attention. I guess this means we haven't had any Windows developers using the Ruby SDK in the past. The approach used in that Stripe PR may well be the way to go; we'll look into it ASAP.
(We hadn't been running CI tests in Windows... but we were running them with JRuby and had no problem, which is interesting since that Stripe PR says it doesn't work with JRuby either.)
We might also be able to use the keep-alive support that's built into Net::HTTP, but there may have been some reason that I've forgotten why we didn't do that in the first place.
I think we are probably going to go with removing net-http-persistent entirely. It provides a somewhat more convenient API for doing keep-alive, as well as connection pooling, but the latter isn't really relevant to what we're doing (we just make one request at a time to the same host). This is a straightforward enough code change and I've tested it successfully, but I'll need to do a bit more testing to make sure there aren't any significant differences in how it responds to error conditions.
This and #125 have both been fixed in the 5.5.3 release. We're also running a CI test suite in Windows now, although currently it's only for the most recent Ruby version. If you run into any more problems like this, please let us now,.
Activity
eli-darkly commentedon Jan 31, 2019
Thanks for bringing this to our attention. I guess this means we haven't had any Windows developers using the Ruby SDK in the past. The approach used in that Stripe PR may well be the way to go; we'll look into it ASAP.
(We hadn't been running CI tests in Windows... but we were running them with JRuby and had no problem, which is interesting since that Stripe PR says it doesn't work with JRuby either.)
eli-darkly commentedon Jan 31, 2019
We might also be able to use the keep-alive support that's built into
Net::HTTP, but there may have been some reason that I've forgotten why we didn't do that in the first place.eli-darkly commentedon Jan 31, 2019
I think we are probably going to go with removing net-http-persistent entirely. It provides a somewhat more convenient API for doing keep-alive, as well as connection pooling, but the latter isn't really relevant to what we're doing (we just make one request at a time to the same host). This is a straightforward enough code change and I've tested it successfully, but I'll need to do a bit more testing to make sure there aren't any significant differences in how it responds to error conditions.
eli-darkly commentedon Jan 31, 2019
Also, after making that change, I found that it still wouldn't run on Windows due to a different error: #125 So we're working on that as well.
eli-darkly commentedon Feb 14, 2019
This and #125 have both been fixed in the 5.5.3 release. We're also running a CI test suite in Windows now, although currently it's only for the most recent Ruby version. If you run into any more problems like this, please let us now,.
Merge pull request #124 from launchdarkly/eb/ch60312/reason-type