title: How to configure Rails 5.2.1 server listen on all interfaces?
body: <p>I'm still fairly new to RoR and learning so please bear with me if I have follow-up questions. Our Rails (v 5.0.2) app was configured to listen on all interfaces with this configuration in <code>config/boot.rb</code>:</p>
  
  <pre><code>require 'rails/commands/server'
  module Rails
    class Server
      def default_options
        # make rails listen on all interfaces (accept connections from any ip)
        super.merge(Host: '0.0.0.0', Port: 1234)
      end
    end
  end
  </code></pre>
  
  <p>I recently upgraded Rails from <code>5.0.2</code> to <code>5.2.1</code> and when I run <code>rails s</code>, I get:</p>
  
  <pre><code>/Users/aum/rails_app/config/boot.rb:5:in `require': cannot load such file -- rails/commands/server (LoadError)
      from /Users/aum/rails_app/config/boot.rb:5:in `&lt;top (required)&gt;'
      from bin/rails:8:in `require_relative'
      from bin/rails:8:in `&lt;main&gt;'
  </code></pre>
  
  <p>So I updated the <code>'require'</code> to <code>rails/commands/server/server_command</code> and now I get </p>
  
  <pre><code>rails s
  /Users/aum/.rvm/gems/ruby-2.3.3@rails_app/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:110:in `&lt;module:Command&gt;': uninitialized constant Rails::Command::Base (NameError)
  Did you mean?  Base64
    from /Users/aum/.rvm/gems/ruby-2.3.3@rails_app/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:109:in `&lt;module:Rails&gt;'
    from /Users/aum/.rvm/gems/ruby-2.3.3@rails_app/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:11:in `&lt;top (required)&gt;'
    from /Users/aum/rails_app/config/boot.rb:5:in `require'
    from /Users/aum/rails_app/config/boot.rb:5:in `&lt;top (required)&gt;'
    from bin/rails:8:in `require_relative'
    from bin/rails:8:in `&lt;main&gt;'
  </code></pre>
  
  <p>I'm not sure how/where to specify the host and port in Rails 5.2.1 since the <code>default_options</code> definitions has also changed here: <a href="https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server/server_command.rb#L68" rel="noreferrer">https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server/server_command.rb#L68</a></p>
  
  <p>NOTE: I can start the server with <code>rails s -b 0.0.0.0 -p 1234</code> but that is not what I'm trying to do.</p>
  
  <p>Thanks in advance for your help!</p>