当对Phusion乘客运行时,Bundler无法找到Rails目录 [英] When run on Phusion passenger, Bundler cannot find the Rails directory

查看:110
本文介绍了当对Phusion乘客运行时,Bundler无法找到Rails目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以这是我的问题。我使用Capistrano将Rails 3应用程序部署到安装了Phusion Passenger 3的Ubuntu服务器上。一切都应该正常工作,但我一直收到此错误消息。

So this is my problem. I used Capistrano to deploy my Rails 3 app to an Ubuntu server, which has Phusion Passenger 3 installed. Everything should have worked normal, but I kept getting this error message.


无法在/ var / www / rails / releases / 20100916074325中找到Gemfile。 (Bundler :: GemfileNotFound)

Could not locate Gemfile in /var/www/rails/releases/20100916074325. (Bundler::GemfileNotFound)

错误消息中的目录(我为澄清而添加)确实存在于系统上,因此也存在Gemfile。在错误消息下方,堆栈跟踪显示错误已引发

The directory in the error message (which I added for clarification) does exist on the system and so does the Gemfile. Underneath the error message, the stack trace showed the error is thrown inside


/usr/lib/ruby/gems/1.8/gems/bundler -1.0.0 / lib / bundler / shared_helpers.rb

/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/shared_helpers.rb

所以我去了那里,并添加了输出以检查是否存在路径上的所有目录,并且每一个返回false一直到'www'。我太不可思议了

So I went in there and added outputs to check the existence of the the directories on that path, and every single one returned false all the way down to 'www'. I'm incredulous.

为什么在乘客下奔跑的Bundler找不到这些路径?我该怎么解决? (这时我将放弃乘客。)

Why can't Bundler, running under Passenger, find these paths? What can I do to resolve it? (I'm about to give up on Passenger at this point.)

推荐答案

这几乎肯定是一个权限问题。也就是说,请尝试Phusion Passenger git master;我们已经添加了积极的权限检查,所以现在它应该告诉您确切的问题和需要解决的问题,而不是像现在看到的那样通过神秘的错误消息让事情出错。

This is almost definitely a permission issue. That said, please try Phusion Passenger git master; we've added aggressive permission checks so now it should tell you exactly what's wrong and what needs fixing instead of letting things error out with cryptic error messages like what you're seeing now.

Bundler认为由于权限问题,路径不存在。具体来说: File.directory?( / a / b / c)如果 / / a / a / b 没有适合当前进程所有者的可执行位。

Bundler thinks the paths don't exist because of permission problems. Specifically: File.directory?("/a/b/c") returns false if /, /a or /a/b don't have the right executable bits for the current process's owner.

这篇关于当对Phusion乘客运行时,Bundler无法找到Rails目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆