'Rails server command is hanging

Could someone please help with my issue? I'm novice at Ruby on rails... I just created a new application by running rails new my_app, then I went to cd my_app and tried to run rails server by running rails server command. My output is:

C:\Users\Cama\my_app>rails s
=> Booting WEBrick
=> Rails 4.1.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0
.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2014-04-15 20:54:14] INFO  WEBrick 1.3.1
[2014-04-15 20:54:14] INFO  ruby 2.0.0 (2013-06-27) [i386-mingw32]
[2014-04-15 20:54:14] INFO  WEBrick::HTTPServer#start: pid=5172 port=3000

And I've been waiting for 20 minutes and nothing happened.

What could be my problem?

Thank you, Cama



Solution 1:[1]

Same problem, different reason. I had a weird case where one of my ruby gems was trying to start a (weird, and unrelated) process. When it couldn't find the program it was after, it just stalled and both rails s and rails c hung indefinitely.

I could tell it was the gem because when I'd ctrl + c to stop the server it would error and the last line was

/Users/st/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/bundler/gems/rinruby-3db385cbda91/lib/rinruby.rb:537:in `write'

which showed me it was the rinruby trying to start R.

Although this is quite a specific answer, the same idea my apply to yourself or others: if a gem or another process is trying to do something very lengthy (or which has hung), it may cause the server to hang.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 stevec