Rails 升级破坏了开发服务器上的自定义域
Rails upgrade broke custom domains on dev server
我刚刚将 Rails 应用程序从 4.1.3 升级到 4.2.4。我之前编辑了我的开发服务器的主机文件,以便 my.domain
指向 localhost 并一直使用它来处理我的应用程序。但是,现在我已经升级到 rails 4.2.4,my.domain:3000
无法连接;只有 localhost:3000
会。
我不记得我最初是否配置了任何其他会受到升级影响的东西,但我想我没有做过。 development.log
中没有任何内容可以提供任何提示(考虑到浏览器表示它甚至没有连接,这是有道理的)。
如果重要的话,我在我的开发服务器上使用 gem 'foreman', '~> 0.78.0'
。
我知道我不会付出很多努力,但有人知道这里会发生什么吗?
这可能与 Rails 4.2 no longer binding to the public interface. I'm not sure if your dev server is local or not. If it is, you will probably need to adjust your hosts entry to 127.0.0.1 instead of 0.0.0.0. If not, you will probably need to allow Rails to use the public interface. There is a bug report for this issue 有关,其中包含一些可能的解决方法。
由于 Rack 的变化,rails 服务器现在默认侦听本地主机而不是 0.0.0.0。请参阅 4.2 release notes 启动您的服务器:
rails server -b 0.0.0.0
恢复旧行为
我刚刚将 Rails 应用程序从 4.1.3 升级到 4.2.4。我之前编辑了我的开发服务器的主机文件,以便 my.domain
指向 localhost 并一直使用它来处理我的应用程序。但是,现在我已经升级到 rails 4.2.4,my.domain:3000
无法连接;只有 localhost:3000
会。
我不记得我最初是否配置了任何其他会受到升级影响的东西,但我想我没有做过。 development.log
中没有任何内容可以提供任何提示(考虑到浏览器表示它甚至没有连接,这是有道理的)。
如果重要的话,我在我的开发服务器上使用 gem 'foreman', '~> 0.78.0'
。
我知道我不会付出很多努力,但有人知道这里会发生什么吗?
这可能与 Rails 4.2 no longer binding to the public interface. I'm not sure if your dev server is local or not. If it is, you will probably need to adjust your hosts entry to 127.0.0.1 instead of 0.0.0.0. If not, you will probably need to allow Rails to use the public interface. There is a bug report for this issue 有关,其中包含一些可能的解决方法。
由于 Rack 的变化,rails 服务器现在默认侦听本地主机而不是 0.0.0.0。请参阅 4.2 release notes 启动您的服务器:
rails server -b 0.0.0.0
恢复旧行为