Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having a problem with Passenger not being able to start due to an apparently common issue in which Passenger claims: No such file or directory - config/environment.rb.

I have searched the web high and low and this appears to be a permissions related issue. It is my understanding that Passenger runs as the owner of config.ru and config/environment.rb file. In my case this owner is "admin". I am running the app root in the home directory of the admin user. So I believe I have the correct permissions set using: sudo chown -R admin:admin /home/admin/www and sudo chmod -R 755 /home/admin/www

where the app root is located at: /home/admin/www/app

Here is my virtual server config file:

 <VirtualHost *:80>
    ServerName track.example.com
    DocumentRoot /home/admin/www/app/current/public
    <Directory /home/admin/www/app/current/public>
    Options FollowSymLinks
    AllowOverride none
    Order allow,deny
    Allow from all
    PassengerResolveSymlinksInDocumentRoot on
    RailsBaseURI /
    PassengerAppRoot /home/admin/www/app
    RailsEnv production   
    ErrorLog ${APACHE_LOG_DIR}/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel debug
    CustomLog ${APACHE_LOG_DIR}/access.log combined

I am running Ubuntu 12.0.4, Rails 3.2.8, Ruby 1.9.3, Passenger 3.0.18, Apache 2

Thanks for your help.

share|improve this question

migrated from stackoverflow.com Nov 16 '12 at 11:14

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

Passenger is a module for Apache, running as part of the Apache process. This means the Apache user needs to have the permissions to the project. From the Passenger documentation for Apache:

You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache:

* this public folder.

* the application’s config folder.

* all parent folders. That is, /webapps/rackapp and /webapps must also be readable and executable by Apache.
share|improve this answer
OK. I modified my permissions and granted the www-data group read & execute permissions on all folders and files from /home/ on down just to open things up for troubleshooting. I am still getting the same Passenger message. Passenger-status shows that Passenger is indeed running and mysql is up and running too. I have touched the /tmp/restart.txt file as well as restarted Apache to no avail. –  scervera Nov 16 '12 at 10:46
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.