rails g
で以下のようなエラーで動かない場合
/var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/run.rb:98:in `gets': Interrupt
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/run.rb:98:in `verify_server_version'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/run.rb:56:in `run'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/run.rb:37:in `warm_run'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/run.rb:26:in `call'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/rails.rb:24:in `call'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/client.rb:26:in `run'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/bin/spring:48:in `<top (required)>'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `load'
from /var/share/sample/vendor/bundle/ruby/2.2.0/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `<top (required)>'
from /var/share/sample/bin/spring:16:in `require'
from /var/share/sample/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
springを以下のコマンドで停止させると解決できました。
bundle exec spring stop