Rails/Ruby 新手帮助。彻底迷失了! (我认为与杂种有关)503错误

发布于 2024-09-30 09:55:59 字数 1654 浏览 2 评论 0原文

我正准备雇人来解决这个问题 对我来说,但我希望事情不会发展到那一步。

我没有 Rails/Ruby 的经验,但我知道我的方法 一般计算机。

我在一台服务器上有两个域(Hostingrails,我开始讨厌 这些天他们越来越多)。

我的辅助域名 100% 正常工作。

但是这几天我的主域一直不能用, 一直给我 503 错误。我已经就此事开了一张票,并且 他们告诉我通过 SSH 连接到我的服务器并重置“Mongrel”。我已经这样做了 使用他们给我的代码; “ mongrel_rails 开始 -d -e 生产 -p13930"

似乎有效,但问题仍然存在。日志说 错误是这样的:

"require': no such file to load -- dispatcher (LoadError)"

我已经重新打开了与此相关的票证,Hostingrails 基本上告诉 我认为这不再是他们的问题,这完全取决于我 修复它。杰出的。

所以我花了一天的大部分时间寻找和改变周围的事物 通过 SSH(可能不是最好的主意)但我仍然不断得到 我的网站上出现 503。

然而,我最近发现我的索引文件必须是index.html, 否则它不会渲染页面。 index.htm 或index.php 将导致 503. 如果我将索引页设置为index.html,它就起作用了。奇怪的是, 我的 htaccess 文件允许所有。

另一个问题,我想我无意中改变了我的一些东西 当我通过 SSH 连接时进行设置。当我执行“捆绑安装”时,它会安装 将 gem 放入我自己的私人网站空间,例如 /home/mywebsite。但 我相信在我的共同计划中,所有的 Rails/Ruby/Gems 等都在 /usr/local/rvm/gems/ruby-1.9.2-p0/ 我认为我无权访问。 如何将目录更改为默认目录?例如,之前 错误日志说:

/usr/local/rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
`require': no such file to load -- dispatcher (LoadError)

现在它说:

/home/mysite/.gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
`require': no such file to load -- dispatcher (LoadError)

我想这就是现在的一切。这是安装在我的导轨上 主机服务器:(

Installed at (3.0.0): /usr/local/rvm/gems/ruby-1.9.2-p0
(2.3.8): /usr/local/rvm/gems/ruby-1.9.2-p0

再次,我认为我的杂种找错了地方,因为我的宝石是 现在被安装到 /home/mywebsite/ 而不是 /usr/local/rvm/gems/) 有人可以重置我的设置吗 改回我的主机的默认值?

有人愿意花时间和我一起尝试解决这个问题吗?我 我对 Hostingrails 很恼火,因为我没有做任何创建 这个问题,他们断然拒绝帮助我。为什么是我的 当我的辅助域工作正常时,主域收到 503 错误?

I am on the verge of actually hiring someone to fix this
for me, but I hope it doesn't come to that.

I have no experience with Rails/Ruby, but I do know my way around
computers in general.

I have two domains on one server (Hostingrails, I am beginning to hate
them more and more these days).

My secondary domain works 100% fine.

But for the past few days, my primary domain has not been working, it
has been giving me 503 Errors. I've opened a ticket regarding this, and
they told me to SSH into my server and reset "Mongrel". I've done this
using the code they gave me; "mongrel_rails start -d -e production
-p13930"

It seemed to have worked, but the problem was still there. The log says
the error is something about:

"require': no such file to load -- dispatcher (LoadError)"

I've re-opened a ticket concerning this, and Hostingrails basically told
me that it is not their problem anymore and that it's solely up to me to
fix it. Brilliant.

So I spent a good part of the day looking and changing things around
through SSH (probably wasn't the greatest idea) but I still keep getting
503'd on my website.

However, I recently found out that my index file HAS to be index.html,
or it will not render the page. index.htm or index.php will result in a
503. If I set the index page to index.html, it worked. Which is strange,
my htaccess file allowed for all.

Another problem, I think I have inadvertently changed something in my
settings while I was SSH'd in. When I do "bundle install" it installs
the gems into my own private webspace, for example /home/mywebsite. But
I believe on my shared plan, all the rails/ruby/gems etc are all under
/usr/local/rvm/gems/ruby-1.9.2-p0/ which I don't think I have access to.
How do I change the directory to the default one? For example, before
the error log said:

/usr/local/rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
`require': no such file to load -- dispatcher (LoadError)

Now it says:

/home/mysite/.gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
`require': no such file to load -- dispatcher (LoadError)

I think that's everything for now. Here are the rails installed on my
server by the host:

Installed at (3.0.0): /usr/local/rvm/gems/ruby-1.9.2-p0
(2.3.8): /usr/local/rvm/gems/ruby-1.9.2-p0

(again, I think my mongrel is looking in the wrong place, as my gems are
now being installed into /home/mywebsite/ instead of
/usr/local/rvm/gems/) Is it possible to someone reset the settings I've
changed back into my host's default one?

Would anyone be willing to take the time and try and fix this with me? I
am pretty annoyed at Hostingrails, since I didn't do anything to create
this problem, and they are outright refusing to help me. Why is my
primary domain getting 503 errors when my secondary domain works fine?

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

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

发布评论

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

评论(2

一笔一画续写前缘 2024-10-07 09:55:59

Mongrel 与 ruby​​ 1.9.2 不兼容。你需要使用 mongrel 的 fork 来使用它 https://github.com/kyusik/mongrel_cluster

我建议你可以使用瘦/乘客或独角兽而不是杂种。

我发现了一篇关于 Mongrel 和 ruby​​ 1.9.2 问题的小博客文章 http://xaop.com/blog/2010/08/04/deploying-rails-3-on-ruby-1-9-2/

Mongrel is not compatible to ruby 1.9.2. You need use a fork of mongrel to use it https://github.com/kyusik/mongrel_cluster

I advice you to user thin/passenger or unicorn instead of mongrel.

I found a little blog post about problem with Mongrel and ruby 1.9.2 http://xaop.com/blog/2010/08/04/deploying-rails-3-on-ruby-1-9-2/

唯憾梦倾城 2024-10-07 09:55:59

也许您可以尝试使用 Ruby 1.8.7 - 目前它通常会造成较少的麻烦。

这不是您问题的具体答案,但如果您是 Ruby 和 Rails 的新手,那么托管您自己的东西可能是一项艰巨的任务。

相反,尝试 Heroku - 只需使用 git 将 Rails 应用程序推送到 Heroku 即可。他们免费支持自定义域名。

Maybe you could try using Ruby 1.8.7 - it causes less trouble in general at this time.

Not an answer to your question in particular, but if you're new to Ruby and Rails, then hosting your own stuff can be a daunting task.

Instead, try Heroku - simply push your Rails app to Heroku with git and you're good to go. They support custom domainnames for free.

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