Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility Issue with Ruby 2.4? #62

Open
luismadrigal opened this issue Jan 3, 2018 · 2 comments
Open

Compatibility Issue with Ruby 2.4? #62

luismadrigal opened this issue Jan 3, 2018 · 2 comments

Comments

@luismadrigal
Copy link

luismadrigal commented Jan 3, 2018

I installed fakeweb (1.3.0) in Ruby 2.4.1 and Rails 5.1.4 and when tried to use it I started to get a this error.

Failure/Error: Net::HTTP.get(url)
NoMethodError:  undefined method `<<' for {:read_timeout=>60, :continue_timeout=>nil, :debug_output=>nil}:Hash

And this one, whenever I tried to make and HTTP call using Net::HTTP.

Failure/Error: puts Net::HTTP.get(@uri)
NoMethodError:  undefined method `close' for #<FakeWeb::StubSocket:0x007fc72ea8f230>

I searched the web and found that many other testing frameworks are affected by this compatibility issue and after reading many posts for WebMock and VCR, I finally came across a solution. It suggested doing this and oddly enough it worked.

gem 'fakeweb', :git => 'https://github.com/chrisk/fakeweb.git'

Is it time to make a new gem release?
Why does this work around actually work but the release gem fails?

I hope this helps.

@krisleech
Copy link

There hasn't been a release for many years since the author has been ill. Hopefully there will be one soon. See: #57

@stefanhorning
Copy link

stefanhorning commented Aug 15, 2018

The simple answer is that the git master is ahead of the last release (judging by the git release tag v1.3.0). See v1.3.0...master

ragalie added a commit to Shopify/omniauth-shopify-oauth2 that referenced this issue Sep 18, 2020
There is a fixed bug on fakeweb master and it's unlikely that a new
release will be cut.

See: chrisk/fakeweb#62
moritz-makandra added a commit to moritz-makandra/check-graphite that referenced this issue Dec 21, 2023
A bug makes fakeweb stop working on ruby  greater than 2.4. This issue
is still open chrisk/fakeweb#62 but fixed in
master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants