user1679892
user1679892

Reputation:

Problems in connection to webserver using Ruby on Rails

I have installed Ruby on Rails and have no programming experience. I wanted to connect to webserver as I want to run a demo application.

I did:

$ rails server 

BUT after that my command prompt stops working, meaning that I can not continue (e.g. I can not type a command).

Can anyone give me advice on what to do next?

console screen shot showing <code>rails s</code> output

Thanks for any help.

Upvotes: 1

Views: 117

Answers (4)

Taryn East
Taryn East

Reputation: 27747

Yes. When you start the rails server it takes over the terminal that you were using to print out the log. You will not be able to enter new commands until you either:

  1. kill the server
  2. run the server in the background (hit CTRL+Z and type "bg")

You could also start the server in background mode with: rails script/server &

However - I recommend opening a second terminal screen for commands, as watching the log is very useful for debugging purposes.

Upvotes: 0

imKalpesh
imKalpesh

Reputation: 91

one more option is goto

    http://127.0.0.1:3000/

try this...

Upvotes: 0

Dmitriy Budnik
Dmitriy Budnik

Reputation: 1576

Start your browser and go to http://localhost:3000/ as You already did according to your screenshot.

Upvotes: 0

Hauleth
Hauleth

Reputation: 23586

I is normal. You have two options, or detach server from console using -d flag or start another concole and work inside there. I prefer the second way because it easier to restart server and check logs when log is outputted on terminal also.

Upvotes: 2

Related Questions