Created
February 12, 2017 05:46
-
-
Save tetsuyainfra/eec2781b8236bffd5e7258801a899234 to your computer and use it in GitHub Desktop.
rails serverのオプションを変更する方法 ※rails restartでも止まらない
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/boot.rb | |
# ~ | |
require 'rails/commands/server' | |
module DefaultOptions | |
def default_options | |
super.merge!(Host:'0.0.0.0', Port: 3000) | |
end | |
end | |
Rails::Server.send(:prepend, DefaultOptions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
詳しい情報はココ
rails/rails#24435