首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在IIS上加载Rails应用程序

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

Stack Overflow用户
提问于 2016-02-13 01:39:01
回答 1查看 277关注 0票数 0

过去几个小时,我一直试图将Rails应用程序部署到运行IIS7.5的WindowsServer2008IISVPs上。

当我试图通过我的浏览器访问网站时,我一直认为这是一个很好的过程直到我发现了这个错误。

error Hel图标Zoo模块发现了一个错误。 请参阅下面的详细资料。 Windows错误系统找不到指定的路径。(错误代码: 3)内部模块错误消息: 不能CreateDirectory '‘文件类型: ZooException文件: Common\WinApi.cpp 行: 253版本: 3.1.98.538

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

13.02.2016 02:47:48.751921 tid 0x000100d4 # 26373856已启动 2016年2月13日02:47:48.831925 tid 0x000100d4 # 26373856申请已被终止

在我看来,CreateDirectory比特的路径很奇怪,但我不知道它从哪里来。

这个站点在我的本地机器上运行良好,但是我的本地机器在Fedora上,所以不使用web.config文件。不幸的是,我暂时被我的Windows服务器困住了,所以Linux主机暂时不是一种选择。

代码语言:javascript
复制
<?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>

到目前为止

  • 重置网站(多次)
  • Ran deploy.rb (多次)
  • 播放文件夹权限。即使在某一时刻允许每个人都有特殊的访问权,别担心,我现在已经收回了。
  • 刷新应用程序池。

我在谷歌上搜索过,但似乎什么也找不到。这里有人有什么建议吗?

这个错误现在可以在这里看到。https://bonniechef.com/希望不会太久.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-15 11:36:34

对不起,道格,我不能再提供这个基于Web平台安装程序版本的Zoo,因为我正在工作一个新的独立版本,这些版本有完全不同的配置和处理逻辑。这个新版本几乎已经完成,我正在完成整个系统的安装和部署,不过,我现在只做这个项目,对旧产品和其他问题的支持占用了我的大部分时间。仍然在考虑开放源码,但是安排一个好的开源项目需要更多的时间和投入。我希望在一个月内发布一个版本。这个新版本将被支持,实际上将更容易维护和更透明,因为我们将控制产品的大部分方面。很抱歉给您带来不便。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35375068

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档