[Beginner] When rails s doesn't work

If you type rails s

Address already in use - bind(2) for 127.0.0.1:3000 (Errno::EADDRINUSE)

Sometimes the local server didn't work. This means that I have used No. 3000 elsewhere, so I will not be able to start up, so I will cut it.

manner

Check the ID of the process running on port 3000.

$ lsof -i :3000
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby    24301 ubuntu    6u  IPv4 161869      0t0  TCP *:3000 (LISTEN)

It comes out like this.

In this case

$ kill -9 24301

You can stop the process if you do, so try rails s again.

Recommended Posts

[Beginner] When rails s doesn't work
SCSS doesn't work when deploying Rails6 AWS
When PyCall doesn't work with PyCall :: PythonNotFound
Breakpoint doesn't work when running Rails Minitest in Ruby Test Explorer
Check when nvidia-smi on Ubuntu doesn't work
[heroku] run rails db: migrate doesn't work
[Beginner] Rails Tutorial
Puma --Nignx is an escape route when rails s -e production -d doesn't work in the environment
rails generate doesn't work at all! Sometimes try
Things to check when it doesn't work with proguard
[Rails 6] RuntimeError with $ rails s
When the vagrant command doesn't work for some reason
[Beginner] About Rails Session
When the server does not start with rails s
Rails server doesn't start.
[Ruby on Rails] When parameter id acquisition does not work
Summary of initial work when creating an app with Rails
The program doesn't work, the program doesn't stop ...
[Programming beginner] What to do when rails s becomes an error in the local development environment
@ClassRules doesn't work with PowerMockRunner
ruby get.chomp.to_i doesn't work, doesn't load
I tried Rails beginner [Chapter 1]
Arrays.asList (int []). Contains (int) doesn't work
I tried Rails beginner [Chapter 2]
Error when using rails capybara
Detailed tips when using Rails
Think when Rails (turbolinks) doesn't load the page for the first time
Links I want to help when JSF doesn't work at all
When Maven is blocked by a company proxy and doesn't work
Spring should be suspected when Rails commands do not work properly
Remedy for "A server is already running." Error when running rails s
[Rails] What to do when rails s does not respond or does not stop