Skip to content

Compatibility Issue with Ruby 2.4? #62

@luismadrigal

Description

@luismadrigal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions