5

我正在使用 Ruby 2.1.1 和 Rails 4.1.0.rc1。执行时rails c,它被锁定。

使用Ctrl-C停止,我得到了错误日志:

~/.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>'

拆下弹簧后,rails c又恢复了。

4

2 回答 2

5

我今天在 Ruby 2.1.1 和 Rails 4.0.3 上遇到了这个问题,我设法通过停止来解决它,spring然后再试一次:

$ spring stop
Spring stopped.
$ bundle exec rails c
Loading development environment (Rails 4.0.3)
[1] pry(main)>
于 2014-07-31T19:44:34.957 回答
3

通过将 Rails 4.1.0.rc1 更新为 4.1.0.rc2 解决

于 2014-04-07T03:00:25.167 回答