Ad

Wednesday, July 17, 2013

Console Debug - Rails Server Error

Tried to start http://0.0.0.0:3000 then keep getting into the website that I was working on with a startup rather than my own Rails app. Also got this error message


`initialize': Address already in use - bind(2) (Errno::EADDRINUSE) Sometimes this happens if you already have a Rails Server running. 

You can start the server at a new port

rails s -p=3001
Or just kill all the ruby processes
killall ruby Source: Stack Overflow
You can also use command line to find all the processes that are running
lsof|grep 3000 lsof | grep -i ruby
Turns out in my case it was more than that. A helpful developer changed my /etc/hosts file to change the localhost alias around, so it's actually unrelated to the Rails stuff. So i have to use
sudo nano /etc/hosts To view this file:

And because this is in the /etc/ directory we need to be very careful not to change these mission critical directories without knowing what we are doing.

No comments:

Post a Comment

K mean clustering sklearn best practice - Udacity Machine Learning Nanodegree Unsupervised Learning

There are three key k means clustering parameters in sklearn that you will need to pay attention to: Number of centroids, aka center of c...