I am very new to this platform, after starting webrick my terminal not allowing me to enter command, is there any clue for it?
Asked
Active
Viewed 490 times
2 Answers
1
Probably if you started your webrick, your server is now running and listening on http://localhost:3000
. To see it, simply open a browser and point to that address.
If you want to stop the server (and enter other commands) as you seem to want to do, press ctrl + c
to kill the server

derekyau
- 2,936
- 1
- 15
- 14
-
Hi Derek, what about without stopping server, I wan to use start writing codes for my new application, how can I do that, is there any command we have to use... – Jay Patel Aug 02 '14 at 08:16
-
the best way to do that, is to just leave the terminal running on that tab, and open a new one to do your active development. You can do this by pressing `ctrl + t` or `apple + t` depending if you are on a mac or not – derekyau Aug 02 '14 at 08:17
-
you can then also put the windows side to side so you can see what is going on in the server logs while you code – derekyau Aug 02 '14 at 08:18
-
I got the answer, instead of writing "rails server" write "rails server -d" to run server as a Daemon – Jay Patel Aug 02 '14 at 08:20
-
or you can do that to daemonize it - though why would you want to? Its actually quite useful to see the logs while in development since it can give you good clues to where your code is wrong. I would once again reccommend, to simply leave it running and open another tab to do development :) – derekyau Aug 02 '14 at 08:21
1
What happens is when you start a webrick server, that specific terminal get occupied.
There are two methods of then writing more commands.
- Either press
ctrl
+t
and you will have a new terminal opened up where you can go to the same directory where you were and then write your commands there. - Or, you can make the server run in the background using :
rails s&
and you can get it in the foreground usingfg

Sankalp Singha
- 4,461
- 5
- 39
- 58