从子域运行 Ruby on Rails

发布于 2024-10-21 19:31:18 字数 864 浏览 0 评论 0原文

我一定错过了一些东西,但 RoR 根本不适合我。我在托管位置安装了 RoR,并且已完成以下所有操作:

cd ~
rails rubyonrails
ln -s rubyonrails www/rubyonrails/rails

添加到 ruby​​onrails/public/.htaccess

RailsBaseURI /rubyonrails

然后:

cd rubyonrails
script/generate model User
script/generate controller User list

当我转到 http://rubyonrails.truthanduntruth.com/rails/ 看起来它根本没有运行 RoR。这可能与我使用子域有关。我使用 cpanel 设置了子域,所以我不确定它是如何完成的。子域文件夹本身位于 /home/public_html/rubyonrails 中,

因此您也可以转到 http ://truthanduntruth.com/rubyonrails/rails/。相反,这给了我一个错误页面。这再好不过了。根据错误页面或我上面的步骤,任何人都可以告诉我缺少什么或哪里出了问题吗?

我想让 RoR 至少运行起来,这样我就可以学习它,但最好我希望它在子域下运行。

谢谢。

I must be missing something, but RoR is just not working for me at all. I have RoR installed where I am hosting, and I have done all of the following:

cd ~
rails rubyonrails
ln -s rubyonrails www/rubyonrails/rails

Added to rubyonrails/public/.htaccess

RailsBaseURI /rubyonrails

Then:

cd rubyonrails
script/generate model User
script/generate controller User list

When I go to http://rubyonrails.truthanduntruth.com/rails/ it seems like it's just not running RoR at all. This might have to do with the fact that I'm using the subdomain. I set up the subdomain with cpanel, so I'm not sure how it's done. The subdomain folder itself is in /home/public_html/rubyonrails

So you can also go to http://truthanduntruth.com/rubyonrails/rails/ . Instead this gives me an error page. This is no better. Based on the error page or my steps above, can anyone tell what I am missing or where I am going wrong?

I'd like to at least get RoR running at all so I can learn it, but preferably I want it to run under the subdomain.

Thanks.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文