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

IOError: closed stream 2.99.0.rc1 #1541

Closed
nathany opened this issue May 20, 2014 · 5 comments · Fixed by #1545
Closed

IOError: closed stream 2.99.0.rc1 #1541

nathany opened this issue May 20, 2014 · 5 comments · Fixed by #1545

Comments

@nathany
Copy link

nathany commented May 20, 2014

This error occurred after updating from RSpec 2.9.9 beta2

Exception encountered: #<IOError: closed stream>
backtrace:
~/.rvm/gems/ruby-2.1.2@jobber/gems/rspec-core-2.99.0.rc1/lib/rspec/core/formatters/base_text_formatter.rb:165:in `close'

Using with guard and spork (haven't seen this with rspec spec yet). I don't have any more details yet.

@myronmarston
Copy link
Member

Thanks for reporting this. Let us know when you have more details; there's not much we can do with just the exception and the one line of backtrace.

@JonRowe
Copy link
Member

JonRowe commented May 20, 2014

This behaviour hasn't changed since 2.14, well since some time in 2010 actually, so it sounds like this could be a guard or spork issue here. I trust you completely shut down spork and guard when upgrading?

@nathany
Copy link
Author

nathany commented May 21, 2014

Verified that spork was not running before starting guard. The other change I see between beta2 and rc1 is: sporkrb/spork-rails#25 (probably unrelated).

This IOError is happening at the very end, after running the tests and reporting on the slowest examples.

Finished in 2.56 seconds
3 examples, 0 failures
Exception encountered: #<IOError: closed stream>
backtrace:
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/formatters/base_text_formatter.rb:165:in `close'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/formatters/base_text_formatter.rb:165:in `close'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/reporter.rb:130:in `block in notify'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/reporter.rb:129:in `each'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/reporter.rb:129:in `notify'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/reporter.rb:114:in `finish'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/reporter.rb:60:in `report'
~/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.0.rc1/lib/rspec/core/command_line.rb:21:in `run'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/test_framework/rspec.rb:11:in `run_tests'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:13:in `block in run'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/forker.rb:21:in `block in initialize'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/forker.rb:18:in `fork'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/forker.rb:18:in `initialize'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:9:in `new'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:9:in `run'
~/.rvm/gems/ruby-2.1.2/gems/spork-1.0.0rc4/lib/spork/server.rb:49:in `run'
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/drb/drb.rb:1588:in `perform_without_block'
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/drb/drb.rb:1548:in `perform'
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/drb/drb.rb:1626:in `block (2 levels) in main_loop'
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/drb/drb.rb:1622:in `loop'
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/drb/drb.rb:1622:in `block in main_loop'
Done.



Frame number: 0/1
[1] guard(main)> exit

@myronmarston
Copy link
Member

@nathany -- I've put together a fix in #1544. Want to give that a shot and see if it solves your issue?

I must admit that I'm puzzled no user has ever reported this error before...we haven't changed that logic in a very long time.

@nathany
Copy link
Author

nathany commented May 21, 2014

@myronmarston Thanks. That is working in guard without the error.

gem "rspec-core", :github => "rspec/rspec-core", :branch => "fix-1541-for-2-99"

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

Successfully merging a pull request may close this issue.

3 participants