在 Media Temple DV 服务器上安装有 mongrel 集群的 Rails

发布于 2024-07-30 03:41:22 字数 860 浏览 4 评论 0原文

首先,我对 Rails 完全是个新手——我一直在努力尝试,但在这里遇到了一些麻烦。

我关注了 http://kb.mediatemple。 net/questions/279/Ruby+on+Rails+using+Mongrel+Clusters 安装 Rails,除了最后一步之一之外,一切正常:

“cp /var/www/vhosts/testapp.mt-example.com /rails/testapp/public/.htaccess /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess.old && echo 'ErrorDocument 500 "应用程序错误 Rails 应用程序无法启动正确地“'> /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess”

它返回:“ cp:无法统计`/var/www/vhosts/myurl.com/rails/myapp/public/.htaccess':没有这样的文件或目录 “

当我访问域时,rails 似乎可以工作 - 但是当我单击“关于您的应用程序的环境”时,我得到“ 我们很抱歉,但有些不对劲。

我们已收到有关此问题的通知,我们很快就会查看它。”

然后,我设置了一些快速脚手架,只是为了看看发生了什么,从浏览器访问这些页面时收到了相同的消息。

提前感谢任何帮助!

First, I'm a complete newb to rails - I've been trying to get my feet wet, but ran into some trouble here.

I've followed http://kb.mediatemple.net/questions/279/Ruby+on+Rails+using+Mongrel+Clusters to install rails, everything worked except one of the last steps:

"cp /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess.old && echo 'ErrorDocument 500 "Application error Rails application failed to start properly"' > /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess"

It returns: "
cp: cannot stat `/var/www/vhosts/myurl.com/rails/myapp/public/.htaccess': No such file or directory
"

When I access the domain, rails seems to work - but when I click "about your application's environment" i get "
We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly."

I then setup some quick scaffolds just to see what was going on, received the same messages when accessing those pages from the browser.

Thanks in advance for any help!

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

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

发布评论

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

评论(1

且行且努力 2024-08-06 03:41:22

在仔细遵循相同的媒体寺庙指南并以这种方式解决之后,现在遇到了完全相同的问题/错误消息:

我检查了 mongrel 的状态,发现它实际上并未启动:

mongrel_cluster]# /etc/init.d/mongrel_cluster status
Checking all mongrel_clusters...
mongrel_rails cluster::status -C testapp.yml
missing pid_file: /var/run/mongrel_cluster/mongrel.4000.pid
missing mongrel_rails: port 4000 ...

然后我在媒体寺庙中遵循了这一线索混合日志的知识库

http://kb.mediatemple.net/questions/245/View+the+Mongrel+Logs+for+a+Ruby+on+Rails+application

在日志中显示此错误消息:

Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.

没问题 -我运行了它要求的更新命令,现在一切正常。 看起来媒体寺庙需要更新他们的说明,因为每个逐行关注它的人都会遇到这个错误,因为它让用户安装 RubyGems 1.3.1(现在通知他们..)

希望这有帮助

Had the exact same problem / error messages just now after carefully following the same media temple howto and figured it out this way:

I checked the status of mongrel and found that it wasn't actually starting:

mongrel_cluster]# /etc/init.d/mongrel_cluster status
Checking all mongrel_clusters...
mongrel_rails cluster::status -C testapp.yml
missing pid_file: /var/run/mongrel_cluster/mongrel.4000.pid
missing mongrel_rails: port 4000 ...

I then followed this lead in the media temple KB for the mongrel logs

http://kb.mediatemple.net/questions/245/View+the+Mongrel+Logs+for+a+Ruby+on+Rails+application

which showed this error message in the logs:

Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.

No problem - I ran the update command it asked for and everything is working now. It looks like media temple needs to update their instructions as everyone who follows it line for line is going to run into this error since it has users install RubyGems 1.3.1 (notifying them now..)

Hope this helps

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