Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 4 console with spring locked

I'm using Ruby 2.1.1 and Rails 4.1.0.rc1. When excute rails c, it's locked.

Using Ctrl-C to stop, I got error logs belore:

~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client/run.rb:47:in `gets': Interrupt
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client/run.rb:47:in `verify_server_version'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client/run.rb:19:in `call'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client/command.rb:7:in `call'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client/rails.rb:23:in `call'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client/command.rb:7:in `call'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/client.rb:26:in `run'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/bin/spring:48:in `<top (required)>'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/binstub.rb:11:in `load'
    from ~/.rvm/gems/ruby-2.1.1/gems/spring-1.1.2/lib/spring/binstub.rb:11:in `<top (required)>'
    from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from ~/Sites/ihaveu/bin/spring:16:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

After spring removed, rails c resumed.

like image 785
swordray Avatar asked Apr 06 '14 06:04

swordray


1 Answers

I had this issue today on Ruby 2.1.1 and Rails 4.0.3, and I managed to fix it by stopping spring before trying again:

$ spring stop
Spring stopped.
$ bundle exec rails c
Loading development environment (Rails 4.0.3)
[1] pry(main)>
like image 163
ford Avatar answered Oct 13 '22 11:10

ford