终端“rails生成控制器页面回家”无法正常工作

时间:2015-03-01 20:18:27

标签: ruby ruby-on-rails-3 ruby-on-rails-4 terminal gemfile

因此,我输入以下命令来生成页面:

rails生成控制器页面主页

在此终端停止响应后,我花了很多时间。我不得不使用C ^退出。执行此操作时,将显示以下文本:

      /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/run.rb:78:in `sleep': Interrupt
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/run.rb:78:in `boot_server'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/run.rb:51:in `cold_run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/run.rb:28:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/rails.rb:23:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client.rb:26:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/bin/spring:48:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/prafulk/code/omrails/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>

我不知道发生了什么。这是我在我的应用程序中运行的内容:

ruby​​ 2.2.0p0 rails 4.2.0

任何帮助都将不胜感激。!

3 个答案:

答案 0 :(得分:1)

Gemfile移除Spring,因为它似乎会给您带来困难。

答案 1 :(得分:0)

你说你试图使用ruby 2.2.0,但它看起来像你使用系统Ruby版本(2.0.0)。 我会确保您使用的是ruby版本管理器(rbenv或rvm),因此您可以设置本地(项目)ruby版本并为每个版本安装所需的gem。

答案 2 :(得分:0)

您正在查看堆栈跟踪。当你看这个时,你看看自下而上。

以下是发生的事情(忽略bin / rails)。第from /Users/prafulk/code/omrails/bin/spring:13:in '<top (required)>'行意味着第/Users/prafulk/code/omrails/bin/spring行的文件13遇到错误,这会使堆栈中的其他内容发生,以sleep interupted结尾,因为您按^c

看看春天的第13行。