使用 FastCGI 和 Url Rewrite 在 Windows IIS 7.5 上安装 RoR
我正在尝试使用 FastCGI 在带有 IIS 7.5 的 Windows 7 安装上安装 RoR 3。
到目前为止,我已经安装了 Ruby on Rails,它使用“rails 服务器”工作,我可以在 http://localhost 上看到该站点: 3000,但我想在 IIS 中运行该网站。我已经设置了 FastCGI 应用程序,并设置了所有权限(我能想到的)以允许其工作,但在浏览 IIS 站点时我得到的只是 500 错误
HTTP Error 500.0 - Internal Server Error
F:\Ruby\bin\ruby.exe - The FastCGI process exited unexpectedly
有关如何调试原因的任何想法这正在发生。当我启用失败请求跟踪时,我看到的只是 FASTCGI_UNEXPECTED_EXIT。在日志的详细信息中,我看到了这一点:
NOTIFY_MODULE_START
FASTCGI_ASSIGN_PROCESS
FASTCGI_START
FASTCGI_WAITING_FOR_RESPONSE
FASTCGI_UNEXPECTED_EXIT ** This is where the error is
我不确定从哪里开始调试此问题,或者是否支持此设置。
只是顺便说一句:我也在尝试使用 URL 重写。我在网上找到的所有内容都已经使用了对“.fcgi”的重写以供处理程序使用,但我不确定 Rails 3 是否需要这样做。如果需要,这个文件是如何生成的?
I'm trying to get RoR 3 installed on my Windows 7 Installation with IIS 7.5 using FastCGI.
So far, I have gotten Ruby on Rails installed and it works using 'rails server' and I can see the site on http://localhost:3000, but I want to run this site in IIS. I have setup the FastCGI application, and have set all of the permissions (that I can think of) to allow this to work, but all I am getting is a 500 error when browsing to the IIS site
HTTP Error 500.0 - Internal Server Error
F:\Ruby\bin\ruby.exe - The FastCGI process exited unexpectedly
Any ideas on how I can debug why this is happening. When I enable Failed Request Tracing, all I see there is FASTCGI_UNEXPECTED_EXIT. In the details of the log, I see this:
NOTIFY_MODULE_START
FASTCGI_ASSIGN_PROCESS
FASTCGI_START
FASTCGI_WAITING_FOR_RESPONSE
FASTCGI_UNEXPECTED_EXIT ** This is where the error is
I am not sure where to begin to debug this issue, or if this setup is even supported.
Just to throw in there: I am also trying to use URL Rewrite. Everything I have found online already uses a rewrite to a '.fcgi' for the handler to use, but I'm not sure if this is needed for Rails 3. If so, how is this file generated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想尝试使用 Helicon Zoo。它依赖 Microsoft Web Platform Installer 来完成所有繁重的设置工作FastCGI 正确。
You might want to try using Helicon Zoo. It relies on the Microsoft Web Platform Installer to do all the heavy lifting of setting up FastCGI properly.
我的建议是:不要。 (抱歉,我只是不得不这么说)但实际上,我最不想做的事情就是尝试将活动扳手 RoR 放入 Windows 盒子中。 RoR 并不是为此而生的。为什么不在 Rackspace 或 Amazon 的云中设置实例?对于一个简单的入门实例来说,它的成本低于家里的互联网连接成本。此外,亚马逊还有免费套餐,因此您可以随意使用而无需付费。
My recommendation: don't. (sorry, I just had to say that) But really, the last thing I would want to do would be to try and monkey wrench RoR into a windows box. RoR just wasn't made for it. Why not setup an instance in a cloud at Rackspace or Amazon? It costs less than your internet connection at home for a simple starter instance. Also, Amazon has a free tier so you can mess around without being charged.