spring: Spring hangs when it can't connect to the server.

It should have a timeout.

^C/Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client/run.rb:47:in `gets': Interrupt
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client/run.rb:47:in `verify_server_version'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client/run.rb:19:in `call'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client/command.rb:7:in `call'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client/rails.rb:23:in `call'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client/command.rb:7:in `call'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/client.rb:26:in `run'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/bin/spring:32:in `<top (required)>'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/binstub.rb:11:in `load'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/justin/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/justin/workspace/blacklight/spec/internal/bin/spring:16:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 1
  • Comments: 27 (1 by maintainers)

Most upvoted comments

Same issue here. Running bin/spring just hangs. Ctrl + C spits out this:

[dmoore (feature-67890060-pull-syjdata-coldhouse)]$ bin/spring
^C/Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/client/run.rb:47:in `gets': Interrupt
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/client/run.rb:47:in `verify_server_version'
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/client/run.rb:19:in `call'
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/client/command.rb:7:in `call'
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/client.rb:26:in `run'
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/bin/spring:48:in `<top (required)>'
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/binstub.rb:5:in `load'
    from /Users/dmoore/.rvm/gems/ruby-2.1.0@nplate-syjregs-api/gems/spring-1.1.2/lib/spring/binstub.rb:5:in `<top (required)>'
    from /Users/dmoore/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/dmoore/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from bin/spring:16:in `<main>'

Stopping and running it again seems fixes the issue:

$ spring stop
$ bin/spring

It’s help me too. Thanks 👍

$ spring stop $ bin/spring

Still have this issue in spring 2.1.0.

Happened for me today @demisx solution worked. Would like to understand what is happening though as my tests were hanging…

$ ./bin/spring -v
Spring version 1.7.1
$ rails -v
Rails 5.0.0.rc1