[Ruby on Rails] How to stop when Rails server cannot be stopped by Ctrl + C

Introduction

I will explain what to do when you can not stop the server with Ctrl + C, such as when you close the terminal where you typed the rails server command.

environment

macOS Catalina version 10.15.7

procedure

Find out the process number (PID) of rails server

$ lsof -i:3000

When run, it will display the process number (PID) of the currently running rails server.

Execute the kill command

Execute the kill command with the displayed process number (PID).

$ kill -9 process number(PID)

This will stop it.

Recommended Posts

[Ruby on Rails] How to stop when Rails server cannot be stopped by Ctrl + C
How to use Ruby on Rails
[Ruby on Rails] How to use CarrierWave
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
[Ruby on Rails] How to display error messages
How to add / remove Ruby on Rails columns
[Ruby on Rails] How to install Bootstrap in Rails
[Ruby on Rails] How to use session method
[Ruby on Rails] How to write enum in Japanese
What to do if rails server can't be stopped
[Ruby On Rails] How to reset DB in Heroku
(Ruby on Rails6) How to create models and tables
Settings to be done when changing from Sublime Text to VScode (when writing Ruby On Rails)
How to terminate rails server
How to display a graph in Ruby on Rails (LazyHighChart)
[Ruby on Rails] Column restrictions when saving to DB (4 representatives)
How to run React and Rails on the same server
How to deploy jQuery on Rails
[RSpec on Rails] How to write test code for beginners by beginners
How to deploy Bootstrap on Rails
[Ruby on Rails] "|| =" ← Summary of how to use this assignment operator
[Ruby on Rails] How to avoid creating unnecessary routes for devise
[Ruby on Rails] Pass the parameters divided by date_select to FormObject.
Rails tutorial When rails new cannot be done due to different versions
[Ruby on Rails] Stop "looping until ..."
[Ruby On Rails] In the create action and destroy action, emergency measures when redirect_to action:: show cannot be (cannot be used)
[Ruby on Rails] When logging in for the first time ・ How to split the screen in half using jQuery
What to do when CentOS cannot be started with VirtualBox on Catalina
How to create a query using variables in GraphQL [Using Ruby on Rails]
How to build a Ruby on Rails environment using Docker (for Docker beginners)
How to solve the problem that notification cannot be requested on iOS14
What to do when Blocked Host: "host name" appears in Ruby on Rails
How to implement gem "summer note" in wysiwyg editor in Ruby on Rails
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
How to solve the local environment construction of Ruby on Rails (MAC)!
How to debug the processing in the Ruby on Rails model only on the console
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
[Ruby On Rails] How to search the contents of params using include?
What to do when "call'Hoge.connection' to establish a connection" appears on rails c
[Rails] Posts cannot be deleted when commented! ??
How to resolve errors when installing Rails 5.1.3
Deploy to Heroku [Ruby on Rails] Beginner
Preparing to introduce jQuery to Ruby on Rails
Rails server cannot be started in Cloud9
[Ruby on Rails] Button to return to top
[Ruby on Rails] How to make the link destination part of the specified id
[Ruby on Rails] Rails tutorial Chapter 14 Summary of how to implement the status feed
How to implement image posting function using Active Storage in Ruby on Rails
[Ruby on Rails] How to Japaneseize the error message of Form object (ActiveModel)
[Rails] How to decide the destination by "rails routes"
Deploy to Ruby on Rails Elastic beanstalk (EB deploy)
[Rails] How to write when making a subquery
How to configure ubuntu to be used on GCP
[Ruby On Rails / HTML] How to display the cursor (caret) at an appropriate place when displaying a web page
How to output CSV created by Rails to S3
How to separate .scss by controller in Rails
[Rails MySQL] How to reset DB on heroku
How to write offline real time Implementation example by ruby and C99 of F04
[Ruby On Rails] How to use simple_format to display the entered text with line breaks
[Rails] on :: Action Conditionally set callback cannot be avoided by using skip_callback and set_callback