Ruby on Rails console is hanging when loading Ruby on Rails console is hanging when loading ruby-on-rails ruby-on-rails

Ruby on Rails console is hanging when loading


Restarting Spring should fix the hanging commands:

$ bin/spring stop

I experienced hanging commands (rake, bin/rails, etc.) after deleting and recreating a new Ruby on Rails application. Google wasn't that helpful. I hope this is.

Spring will start automatically when you re-run your command.


It's something wrong with the Spring gem version I guess.

Go to your Gemfile and comment gem 'spring'. Then run bundle install and try again.

# gem 'spring'

And then:

bundle install

If your work depends on the gem, try update the gems by:

bundle update


If $ bin/spring stop doesn't solve the issue, then check to make sure there isn't an orphaned Spring process still hanging around:

$ ps aux | grep -i spring

If you see something like

user  7163  0.0  0.0 110356  2165 pts/3    S+   19:40   0:00 grep --color=auto -i springuser 16980  0.0  0.4 398826 17580 ?        Sl   Aug31   0:00 spring server | current | started 277 hours ago     

then kill the errant spring process and try to start the console again:

$ kill -9 16980 $ rails c