Rails 不适用于 Safari
我正在尝试学习 Ruby on Rails 的一些基础知识,但遇到了一个问题:我的 Rails 项目似乎在 Firefox 中运行良好,但在 Safari 中却没有显示任何内容?
我还在一个新项目中尝试过这个:
rails emptytest
cd emptytest
script/server
生成输出:
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
使用 Firefox,显示了 Rails 默认页面,使用 Safari 则没有显示任何内容(没有错误,“页面源”也是空的)。
嗯...还在写这篇文章时,我发现了线程 Rails 2.3 仅服务于 Firefox,建议升级 mongrel(Web 服务器);由于某些原因,Rails 2.3 和旧版本的 Mongrel 不能很好地协同工作。
sudo gem update mongrel
之后,rails 页面也按预期在 Safari 中显示。
如果有人遇到同样的情况,我会在这里写下来。 (我没有找到任何与 ruby-on-rails + safari 标签相关的内容)
I'm trying to learn some basics of Ruby on Rails and encountered a problem : my Rails project seems to work fine with Firefox but nothing is shown with Safari?
I also tried this with a new project :
rails emptytest
cd emptytest
script/server
Producing output:
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
With Firefox, the Rails default page was shown, with Safari nothing was shown (no error, "Page source" was also empty).
Hmm... While still writing this, I found the thread Rails 2.3 just serving Firefox which adviced to upgrade mongrel (the web server); for some reasons Rails 2.3 and old versions of Mongrel would not work well together.
sudo gem update mongrel
After that, rails pages were shown as supposed with Safari also.
I'll write this down here if somebody ends up in the same situation. (I didn't found anything relevant with tags ruby-on-rails + safari)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如问题中提到的,升级 mongrel 解决了这个问题。
As mentioned in the question, upgrading mongrel solved the problem.