0

I want to start my server through this command but it show me warning server is all ready running. How can stop the server forcefully ?

jaskaran@jaskaran-Vostro-1550:~/rails_project$ rails s
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
A server is already running. Check /home/jaskaran/rails_project/tmp/pids/server.pid.
Exiting

if it is already running then it not working why?

Jaskaran
  • 188
  • 1
  • 1
  • 12

3 Answers3

3

Run this command:

ps ax | grep rails

This will show you the processes running having to do with Rails. The first number shown is the process ID. Look for the process that is running the Rails server, grab it's process ID, and type:

kill -9 processID

This will kill the Rails server that's running.

MrDanA
  • 11,489
  • 2
  • 36
  • 47
  • You're welcome. Be sure to mark the this answer as the one that solved your problem so others will know! – MrDanA May 11 '14 at 04:43
0

Run this command :-

ps aux | grep ruby

 OR

ps -ef | grep ruby

It will show all the processes of ruby and also the running rails server

Then kill that processid as:-

kill -9 procesid
Shamsul Haque
  • 2,441
  • 2
  • 18
  • 20
0

You can also remove the file inside:

/home/jaskaran/rails_project/tmp/pids/

i.e

server.pid

and start server again.

SNEH PANDYA
  • 797
  • 7
  • 22