Failed to open TCP connection RSpec + Capybara testing (Ruby on Rails) #52722
-
Hola every1, I've been struggling a lot recently to fix this issue. I really Googled a lot and couldn't find an answer, most of the related questions were left unanswered. Issue description:I'm trying to simply test my cases with RSpec + Capybara with Selenium by running the command Error images:Version details:
What I've tried so far:I tried to change the timeout from 60 seconds to above by overriding Capybara timeout variable, but it didn't work! I really don't know how to fix this, it's been a while since I've been stuck on this, and I can't find an answer anywhere. If someone knows what's going on here please let me know. Thanks in advance 🙌 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Did you figure out what to do? I'm having a similar issue |
Beta Was this translation helpful? Give feedback.
Yes I did!
Solution: As you can see in the screenshot, line 61 should be commented out and please make sure you add a break statement after it, the file location of socket.rb on my PC is C:\Ruby31-x64\lib\ruby\3.1.0\socket.rb. I think it's their bug that somehow passed unnoticed in their sockets, and I was too lazy to send them a pull request, so if you want, guys, please do it. I hope this fixes a problem for you as well as the others.
Please comment below if this worked for you so I can close this and mark it as resolved!
P.S: My eyes bled trying to solve this error back then 🤬