Rails Rails 4.2 默认行为

zlx_star · January 27, 2016 · Last by msg7086 replied at January 27, 2016 · 2042 hits

Rails 4.2 以后 server 默认监听 localhost 而不是之前的 0.0.0.0

要使用原先的 0.0.0.0,可以这样启动:rails s -b 0.0.0.0

今天被小坑了一把,附上相关 Release Note http://edgeguides.rubyonrails.org/4_2_release_notes.html#default-host-for-rails-server

Due to a change in Rack postmodern committed on Feb 10, 2013

已经快 3 年过去了。

😄 之前不是遇到过了么?

#1 楼 @msg7086 #2 楼 @hz_qiuyuanxin 惭愧,之前一直在本机调试,所以没发现。

You need to Sign in before reply, if you don't have an account, please Sign up first.