title: Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE)
body: <p>First of all, I know <a href="https://stackoverflow.com/questions/31039998/address-already-in-use-bind2-errnoeaddrinuse">this error has already been listed here</a>, but the question was different.</p>
  
  <p>I have a Rails 4 app, that I used to run on Puma.</p>
  
  <p>Then, a friend of mines worked on the app, and recommended that we use Foreman instead.</p>
  
  <p>So, I used to run the app locally with <code>rails s</code> in Terminal.</p>
  
  <p>Now, I am supposed to do it with <code>foreman start</code>.</p>
  
  <p>The problem is, almost every time I try to launch the app, I get the following error:</p>
  
  <pre><code>foreman start
  08:42:28 web.1  | started with pid 3398
  08:42:28 web.1  | [3398] Puma starting in cluster mode...
  08:42:28 web.1  | [3398] * Version 2.13.4 (ruby 2.2.1-p85), codename: A Midsummer Code's Dream
  08:42:28 web.1  | [3398] * Min threads: 5, max threads: 5
  08:42:28 web.1  | [3398] * Environment: development
  08:42:28 web.1  | [3398] * Process workers: 2
  08:42:28 web.1  | [3398] * Preloading application
  08:42:31 web.1  | [3398] * Listening on tcp://0.0.0.0:3000
  08:42:31 web.1  | /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/binder.rb:231:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE)
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/binder.rb:231:in `new'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/binder.rb:231:in `add_tcp_listener'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/binder.rb:98:in `block in parse'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/binder.rb:84:in `each'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/binder.rb:84:in `parse'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/runner.rb:119:in `load_and_bind'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/cluster.rb:304:in `run'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/lib/puma/cli.rb:215:in `run'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/gems/puma-2.13.4/bin/puma:10:in `&lt;top (required)&gt;'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/bin/puma:23:in `load'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/bin/puma:23:in `&lt;main&gt;'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
  08:42:31 web.1  |   from /Users/TXC/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  08:42:31 web.1  | exited with code 1
  08:42:31 system | sending SIGTERM to all processes
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>—————</p>
  
  <p><strong>UPDATE</strong>: I also tried both things below, <a href="https://teamtreehouse.com/community/cant-start-the-rails-server" rel="nofollow noreferrer">as recommended here</a>:</p>
  
  <pre><code>ps aux | grep rails
  3547   0,0  0,0  2434840    752 s000  S+    8:48     0:00.00 grep rails
  </code></pre>
  
  <p>But there is no <code>ruby bin/rails server</code></p>
  
  <p>and that:</p>
  
  <pre><code>lsof -wni tcp:3000
  COMMAND PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
  ruby    808  TXC    8u  IPv4 0x4f6da234a6116dab      0t0  TCP *:hbci (LISTEN)
  ruby    809  TXC    8u  IPv4 0x4f6da234a6116dab      0t0  TCP *:hbci (LISTEN)
  ruby    810  TXC    8u  IPv4 0x4f6da234a6116dab      0t0  TCP *:hbci (LISTEN)
  </code></pre>
  
  <p>but I am not sure of what I am supposed to do with this.</p>
  
  <p>Am I supposed to restart my computer every time I want to launch the app locally?</p>