目录列表而不是应用程序

发布于 2024-08-07 14:55:40 字数 212 浏览 4 评论 0原文

我正在尝试让 RoR 在 bluehost 上运行。我按照教程开始,我认为当默认页面显示时它工作得很好,却发现如果我从 /public 中删除 index.html,则会显示目录列表而不是应用程序。

我使用 Mercurial 将其版本控制到服务器上(可能并不重要)。当我运行本地服务器时,应用程序显示正常。

我还需要做些什么才能使其正常工作,例如更改目录的权限或类似的事情吗?

I'm trying to get RoR running on bluehost. I followed a tutorial to get started, and I thought it worked fine when the default page showed up, only to find that if I delete index.html from /public the directory listing is showing instead of the application.

I use mercurial to version control this onto the server (probably doesn't matter). When I run the local server the application shows up fine.

Is there something more I have to do to make it work, like change permissions on a directory or something like that?

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

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

发布评论

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

评论(2

煞人兵器 2024-08-14 14:55:40

Bluehost 使用什么服务器来运行 Rails 应用程序?是杂种还是别的什么?

我的猜测是,您不是将应用程序设置为 Rails 应用程序,而是设置为通常的(例如 PHP)站点,因此显示了 index.html 和目录列表,但应用程序没有收到任何请求 - 基本上服务器什么都不知道关于它。

What server does Bluehost use for Rails applications? Is it Mongrel or something else?

My guess is that you set up your app not as a Rails app but as a usual (like, PHP) site, so index.html and the directory listing show up, but the application does not receive any requests - basically the server knows nothing about it.

余生再见 2024-08-14 14:55:40

您需要设置默认页面。

使用routes.rb将其配置为在这篇文章中看到

You need to set your default page.

Configure this with routes.rb as seen in this article

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