无法在 IIS 上加载 Rails 应用程序

Can't load Rails application on IIS

过去几个小时我一直在尝试将我的 Ruby on Rails 应用程序部署到我的 Windows Server 2008 R2 vps 运行 IIS 7.5 .

在我尝试通过浏览器访问该网站时出现此错误之前,我一直认为一切顺利。

Error Helicon Zoo module has caught up an error.

Please see the details below.

Windows error The system cannot find the path specified. (ERROR CODE: 3) Internal module error message:

Can't CreateDirectory '' file type: ZooException file: Common\WinApi.cpp

line: 253 version: 3.1.98.538

它自己的日志文件更没有帮助:

[13.02.2016 02:47:48.751921] [v 3.1.98.538] [tid 0x000100d4] [sev 2] # 26373856 Application has been started

[13.02.2016 02:47:48.831925] [v 3.1.98.538] [tid 0x000100d4] [sev 2] # 26373856 Application has been terminated

我觉得 CreateDirectory 位的路径很奇怪,但无法弄清楚它的来源。

该网站在我的本地机器上运行良好,但我的本地机器在 Fedora 上,所以不使用 web.config 文件。不幸的是,我暂时无法使用 Windows 服务器,因此 Linux 托管目前不是一个选项。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>

<heliconZoo>
        <clear />
        <application name="ruby.project">
            <environmentVariables>
                <add name="RAILS_RELATIVE_URL_ROOT" value="%APPL_VIRTUAL_PATH%" />
                <add name="DEPLOY_FILE" value="deploy.rb" />
                <add name="RACK_ENV" value="development" />
                <add name="CONSOLE_URL" value="console" />
            </environmentVariables>
        </application>
 </heliconZoo>


<handlers>
  <remove name="ruby.project#x86" />
  <remove name="ruby.project#x64" />
        <add name="ruby.project#x64" path="*" verb="*" modules="HeliconZoo_x64" scriptProcessor="ruby.2.0.rack" resourceType="Unspecified" requireAccess="Script" preCondition="bitness64" />
        <add name="ruby.project#x86" path="*" verb="*" modules="HeliconZoo_x86" scriptProcessor="ruby.2.0.rack" resourceType="Unspecified" requireAccess="Script" preCondition="bitness32" />
  
</handlers>


<!-- URL Rewrite rules to pass static files, limit console access, etc. -->
<rewrite>
  <rules>

    <!-- This rule rewrites '/' requests to /public/index.html -->
    <rule name="index" stopProcessing="true">
      <match url="^$" ignoreCase="false" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
        <add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
        <add input="{C:1}public\index.html" matchType="IsFile" />
      </conditions>
      <action type="Rewrite" url="public/index.html" />
    </rule>

    <rule name="Static Files" stopProcessing="true">
      <match url="^(?!public)(.*)$" ignoreCase="false" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
        <add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
        <add input="{C:1}public\{R:1}" matchType="IsFile" />
      </conditions>
      <action type="Rewrite" url="public/{R:1}" />
    </rule>

    <rule name="Rails 3.1 assets" stopProcessing="true">
      <match url="^assets/(.*)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
        <add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
        <add input="{C:1}app\assets\{R:1}" matchType="IsFile" />
      </conditions>
      <action type="Rewrite" url="app/assets/{R:1}" />
    </rule>
    
    <!-- This rule shows welcome page when no Rack application exist. -->
    <rule name="Rewrite to Zoo index if that's an empty application" stopProcessing="true">
      <match url="^/?$" ignoreCase="false" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
        <add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
        <add input="{C:1}config.ru" matchType="IsFile" negate="true" />
      </conditions>

      <action type="Rewrite" url="public/zoo-index.html" />
    </rule>

  </rules>    
</rewrite>

</system.webServer>

到目前为止

我搜索了 Google 但似乎找不到任何东西。这里有人有什么建议吗?


此时实际上可以在此处看到该错误。 https://bonniechef.com/ 希望不会太久...

抱歉,Doug,我无法再为这个基于 Web 平台安装程序的 Zoo 版本提供支持,因为我正在开发一个新的独立版本,并且这些版本具有完全不同的配置和处理逻辑。这个新版本快要完成了,我正在完成整个系统的安装和部署,但是,我现在一个人在做这个项目,对旧产品的支持和其他问题占据了我大部分时间。仍在考虑将其开源,但安排一个好的开源项目将需要更多的时间和承诺。我希望在一个月内发布。这个新版本将得到支持,实际上将更容易维护并且更加透明,因为我们将控制产品的大多数方面。 抱歉给您带来不便。