Webrick 在 Mac OSX Lion 上加载速度非常慢
我有一个旧的 Rails 2.3.2 应用程序,我刚刚将其移植到运行 OS X Lion 的新 Mac 上。
当我启动服务器(脚本/服务器)时,它会打印出以下两行
[2012-01-05 18:19:26] INFO WEBrick 1.3.1
[2012-01-05 18:19:26] INFO ruby 1.8.7 (2011-02-18) [i686-darwin9.8.0]
,但在打印之前有很长的延迟:
[2012-01-05 18:20:26] INFO WEBrick::HTTPServer#start: pid=5792 port=3000
一定有问题。
我该如何解决这个问题?
I have an old Rails 2.3.2 application that I just ported to my new Mac running OS X Lion.
When I launch the server (script/server) it prints out the following two lines
[2012-01-05 18:19:26] INFO WEBrick 1.3.1
[2012-01-05 18:19:26] INFO ruby 1.8.7 (2011-02-18) [i686-darwin9.8.0]
but then there is a very long delay before it prints out:
[2012-01-05 18:20:26] INFO WEBrick::HTTPServer#start: pid=5792 port=3000
There must be something wrong.
How can I fix this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,Lion for Ruby 的编译器已更改,而 Developer Tools 4.2 不包含它,因此我必须下载修复程序。
从此处:
一旦我重新编译了 Ruby,一切就正常了。
It turns out that the compiler for Lion for Ruby has changed and Developer Tools 4.2 does not include it so I had to download the fix.
From here:
Once I recompiled my Ruby then everything worked properly.