Skip to content

Instantly share code, notes, and snippets.

Avatar

Frank Koehl BattleBrisket

  • New Context
  • State College, PA
View GitHub Profile
@BattleBrisket
BattleBrisket / WEBrick default address binding.md
Last active Sep 9, 2015
Revert WEBrick bind address in Rails 4
View WEBrick default address binding.md

Rails changed the default behavior for WEBrick somewhere around version 4. Instead of binding to 0.0.0.0, it will now default to localhost.

This makes life difficult when you're running Rails inside a VM like Vagrant, mostly because it won't work. ;)

Fortunately, you can force Rails back into the old universal address with the following snippet

# config/boot.rb

# ... end of existing file
You can’t perform that action at this time.