Wednesday, July 17, 2013

Console Debug - Rails Server Error

Tried to start 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

React UI, UI UX, Reactstrap React Bootstrap

React UI MATERIAL  Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms.  Columns, grid