0
votes

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.

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

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

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.

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.)

1
Passenger 3 is in beta release 2 so obviously, there may be issues. Any chance it is a path or permissions issue?Brian
I've been getting the same error with the previous version, and in fact only updated to 3 because I thought it may be fixed in the new version. I think it's not likely a path or perm issue because the paths don't seem to even exist in the context in which Bundler is run. :-/picardo

1 Answers

2
votes

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 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.