0

So, I type the following command to generate a page :

rails generate controller Pages home

Following this terminal stopped responding and it took a whole lot of my time. I had to use C^ to exit. When I do this the following text is displayed:

      /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>

I don't have a clue what's going on. Here's what i'm running in my app:

ruby 2.2.0p0 rails 4.2.0

Any help would be appreciated.!

3 Answers3

1

Remove Spring from your Gemfile as it seems to be causing you difficulties.

Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261
0

You say your trying to use ruby 2.2.0 but it looks like your using the system Ruby version(2.0.0). I would make sure you're using a ruby version manager(rbenv or rvm) so you can set local(project) ruby versions and install gems you need for each version.

0

You are looking at a stack trace. When you look at this, you take a look at the bottom up.

Here is what is happening (ignoring the bin/rails). The line from /Users/prafulk/code/omrails/bin/spring:13:in '<top (required)>' means that in the file /Users/prafulk/code/omrails/bin/spring at line 13 is encountering an error, that makes the rest of the stuff in the stack happens, ending with sleep interupted because you pressed ^c

Take a look at line 13 in spring.

Reid
  • 4,376
  • 11
  • 43
  • 75
  • So you're telling I shouldn't have interrupted it? It was taking like an hour to initialise. – Praful Konduru Mar 01 '15 at 20:40
  • No. I am saying that the stack was generated because you interrupted it. The code was stuck on line 13 of spring, when you interrupted it. Try again, and see if the code gets stuck on another line, but if I had to bet, line 13 of spring is the problem. – Reid Mar 01 '15 at 20:44
  • I was tweaking with the Gemfile and commented the gem 'spring'(I thought it had something to do with it ) and it worked. Thanks anyways Reid. – Praful Konduru Mar 01 '15 at 20:48
  • No problem. Be sure to upvote any answers that helped, and select an answer to your question (or write your own). Glad it is working! – Reid Mar 01 '15 at 20:52