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

undefined method 'sysread' for class 'StringIO' (NameError) #565

Closed
mmaa opened this issue Jan 4, 2016 · 6 comments
Closed

undefined method 'sysread' for class 'StringIO' (NameError) #565

mmaa opened this issue Jan 4, 2016 · 6 comments
Labels

Comments

@mmaa
Copy link

mmaa commented Jan 4, 2016

When requiring webmock in spec_helper, I get the following exception:

2.2.3/lib/ruby/gems/2.2.0/gems/webmock-1.22.3/lib/webmock/response.rb:5:in 'alias_method': undefined method 'sysread' for class 'StringIO' (NameError)
  from 2.2.3/lib/ruby/gems/2.2.0/gems/webmock-1.22.3/lib/webmock/response.rb:5:in '<class:StringIO>'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/webmock-1.22.3/lib/webmock/response.rb:4:in '<top (required)>'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in 'require'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in 'require'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/webmock-1.22.3/lib/webmock.rb:27:in '<top (required)>'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in 'require'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in 'rescue in require'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in 'require'
  from [...]/spec/spec_helper.rb:1:in '<top (required)>'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in 'require'
  from 2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in 'require'
  from [...]/spec/parsers/line_item_spec.rb:1:in '<top (required)>'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1361:in 'load'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1361:in 'block in load_spec_files'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1359:in 'each'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1359:in 'load_spec_files'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:102:in 'setup'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:88:in 'run'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:73:in 'run'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:41:in 'invoke'
  from 2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/exe/rspec:4:in '<top (required)>'
  from 2.2.3/bin/rspec:23:in 'load'
  from 2.2.3/bin/rspec:23:in '<main>'

I'm using ruby 2.2.3, webmock 1.22.3, and rsepc 3.4.1. Is this a known issue? What's a possible workaround? I'm not really sure where to begin.

@davidbegin
Copy link
Collaborator

Thanks for creating this issue. To my knowledge this is not a known error.

It looks like this line was added for Ruby 1.9.2 support, and is not needed by later versions, so I will work on a fix.

@davidbegin davidbegin added the Bug label Jan 4, 2016
@davidbegin
Copy link
Collaborator

@mmaa I am working on a fix here: #566

could you test if this branch works for you?

@mmaa
Copy link
Author

mmaa commented Jan 4, 2016

Fixed! Thanks for the quick response!

Any idea when this might get released?

@davidbegin
Copy link
Collaborator

@mmaa I was actually working on a release today, but I'm still working out getting my permissions worked out.

So I think we will just skip 1.22.4 and include this fix and release straight to 1.22.5. Hopefully today, but might not be until tomorrow

@mmaa
Copy link
Author

mmaa commented Jan 4, 2016

Excellent, and thanks again. I really appreciate it.

@davidbegin
Copy link
Collaborator

No problem, thanks for submitting an issue! 1.22.5 is now out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants