rails generate scaffold用户名:string email:string但没有任何反应

时间:2017-04-09 02:53:05

标签: ruby-on-rails

我只是跟着<<埋葬轨道教程>> 2.2

当我运行$ rails generate scaffold User name:string email:string时,没有任何事情发生,终端只是挂在那里,我按ctrl+C来取消命令,它显示如下:

  

➜toad_appgit :( master)rails generate scaffold用户名:string email:string   ^ C / Users / duodian / .rvm / gems / ruby​​-2.3.0 / gems / spring-1.7.2 / lib / spring / client / run.rb:117:in gets:   来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/run.rb:117:in verify_server_version的中断       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/run.rb:62:in run       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/run.rb:42:in warm_run       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/run.rb:35:in来电       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in来电       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:24:in来电       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in来电       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in run       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in load'       来自/Users/duodian/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in       来自/ Users / duodian / Desktop / toy_app / bin / spring:15:in require'       来自/ Users / duodian / Desktop / toy_app / bin / spring:15:in'       来自bin / rails:3:加载       来自bin / rails:3:in

我使用的是rails 5.0.1和ruby 2.3.0

1 个答案:

答案 0 :(得分:1)

这是一个春天的问题。 Spring是一个让Rails更快加载你的应用程序的宝石。一旦你开始它它在后台运行,并且经常出于某些原因,休息。然而,出路很简单。

运行此操作并再次尝试使用脚手架:

spring stop