Bind rails server to 127.0.0.1 by default
问题 I'd like to bind the rails server to 127.0.0.1, instead of 0.0.0.0 so its not accessible when I'm working from coffee shops. Is there a configuration file where I can specify this option so I don't have to pass the command line switch: rails server -b 127.0.0.1 ? 回答1: If you are searching for Rails 5 : Answer In Rails ~> 4.0 you can customize the boot section of the Server class: In /config/boot.rb add this lines: require 'rails/commands/server' module Rails class Server def default_options