A Rails 3.2.0 app, working fine with Thin web server, both locally and on Heroku cedar stack.
After:
$ git branch work
$ git checkout work
$ rails se
pgrep ruby
to see what servers are running and then
kill -9 serverNumber
;)
I has this error because i was running rails-dev-box with Rails inside of it.
Port 3000 in the host computer is forwarded to port 3000 in the virtual machine.
Thus, applications running in the virtual machine can be accessed via
localhost:3000 in the host computer.
So is logged out from Vagrant and shutted down it:
vagrant@rails-dev-box:/vagrant/rails$ exit
$ vagrant halt
That helped me.
If there's any other process locking the port, you can find out which PID it has like this:
$ lsof -i :3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Passenger 40466 josh 5u IPv4 0x7cae9332073ed4df 0t0 TCP *:hbci (LISTEN)
Passenger 40467 josh 5u IPv4 0x7cae9332073ed4df 0t0 TCP *:hbci (LISTEN)
Then simply kill it/them:
$ kill -9 40466
$ kill -9 40467