Sometimes while working on rails applications and running them on different ports, I end up getting ‘Address already in use’ error when starting a new application. Usually you can look for the processes with ps and grep the ones you are looking for. But if you are unable to find the process with ps or top, try using lsof for finding open files.
lsof -i tcp:3000
This should list pids for applications using port 3000. Once you have the pid you can kill the process with kill command
kill -9 <PID> #where <PID> is the process id returned by lsof
Hope this helps!