IIS7 上的 Ruby on Rails 未加载资源

发布于 2024-12-28 20:52:12 字数 498 浏览 3 评论 0原文

击中那里,
我正在尝试在 HeliconZoo 模块的帮助下在 IIS7 (Win 2k8 64bit) 上运行 RoR3。但遗憾的是 Ruby 不会从 app/ 文件夹加载任何资源(图像/javascripts/样式表)。

一切都应正确安装,并且在 IIS 中启用“静态内容”。我还可以通过输入正确的 URL 来访问这些文件,但它们没有在我的动态视图中使用或显示。

这是我的应用程序还是 IIS 的问题吗?我是否必须为这些资产设置一些特殊权限?

提前致谢!我很感激任何帮助!

更新:如果我从呈现的页面检查源,则引用资产是从根文件夹链接的,因此资产预计位于“wwwroot/assets”而不是“wwwroot/mysite/public/assets”中,它们实际上位于“wwwroot/mysite/public/assets”中正在被编译到。

显然我无法为资产创建虚拟文件夹,因为我想在该网站上运行多个应用程序...

Hit there,
I am trying to run RoR3 on IIS7 (Win 2k8 64bit) with the Help of the HeliconZoo Module. But sadly Ruby does not load any assets (images/javascripts/stylesheets) from the app/ folder.

Everything should be installed properly and "Static Content" is enabled in IIS. I can also access those files by entering the correct URL to it but they are not being used or shown in my dynamic views.

Is it rather an issue with my app or IIS? Do i have to set some special permissions to those assetts maybe?

Thanks in advance! I appreciate any help!

Update: If i check the source from the rendered page the referring assets are linked from the root folder, so assetss are expected to be in "wwwroot/assets" instead of "wwwroot/mysite/public/assets" where they actually are being compiled to.

Obviously i cannot create a virtual folder for the assets since i want to run multiple apps on that site...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

盗梦空间 2025-01-04 20:52:12

RoR 的 Helicon Zoo 使用页面 中有一个网页.config 示例,其中包含 MS URL 重写的特殊规则,用于加载具有正确位置的资源。

In the Helicon Zoo usage page for RoR there is a web.config example with special rules for MS URL Rewrite which are used to load assets with correct location.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文