Passenger error: No such file or directory - config/environment.rb
Posted
by
JJD
on Server Fault
See other posts from Server Fault
or by JJD
Published on 2012-06-01T16:38:09Z
Indexed on
2012/06/01
16:42 UTC
Read the original article
Hit count: 623
I installed Redmine on MacOSX Server 10.6.8 according to this installation description. So far everything works fine: When I start webrick the server serves the Redmine pages. The gems and redmine are installed under the user "redmine".
After that I aimed configuring apache2 with passenger as described here. As suggested by the description I also installed the passenger-pane which stores its virtual host configuration files in /private/etc/apache2/passenger_pane_vhosts
. This is what I came up with after a lot of manual try and error. At least, now I can reach a passenger error page.
// redmine.vhost.conf
<VirtualHost *:80>
ServerName host
ServerAlias localhost
DocumentRoot "/Users/redmine/Sites/redmine"
# RackEnv production
# RackBaseURI /
RailsEnv production
RailsBaseURI /
# PassengerUser www-data
# PassengerGroup www-data
<Directory "/Users/redmine/Sites/redmine">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
However, the passenger module still runs into the following errors.
Error message: No such file or directory - config/environment.rb
The /var/log/apache2/error_log
of the web server stated the following.
[warn] NameVirtualHost *:80 has no VirtualHosts
[notice] Apache/2.2.21 (Unix) Phusion_Passenger/3.0.12 configured -- resuming normal operations
[ pid=21824 thr=2151905620 file=utils.rb:176 time=2012-06-01 18:22:07.126 ]: *** Exception Errno::ENOENT in PhusionPassenger::ClassicRails::ApplicationSpawner (No such file or directory - config/environment.rb) (process 21824, thread #<Thread:0x0000010086f2a8>):
I experimented with the user switch functionality of passenger as described in the documentation - as you can tell from my configuration file. Though, I was not successful.
© Server Fault or respective owner