Redmine on ubuntu 11.04: passeneger error

Added by Marcelo Lemos about 6 years ago

Hi!
I'm trying to get this working on Ubuntu 11.04. I'm having troubles with passenger.

the error

service apache2 restart
Syntax error on line 6 of /etc/apache2/sites-enabled/redmine:
Invalid command 'PassengerDefaultUser', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!

the apache log

Fri Sep 30 10:42:16 2011] [error] *** Passenger could not be initialized because of this error: The Passenger spawn server script, '/usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/lib/phusion_passenger/passenger-spawn-server', does not exist. Please check whether the 'PassengerRoot' option is specified correctly.

vi /etc/apache2/mods-available/passenger.conf

<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.9
PassengerRuby /usr/bin/ruby1.8
PassengerDefaultUser www-data
</IfModule>

vi /etc/apache2/apache2.conf (at the bottom of the con file)

Include /etc/apache2/mods-available/passenger.conf[/CODE]

vi /etc/apache2/sites-available/redmine (instead of default)

<VirtualHost *:80>
ServerName redmine
DocumentRoot /var/www/redmine/public
PassengerDefaultUser www-data
RailsEnv production
RailsBaseURI /redmine
SetEnv X_DEBIAN_SITEID "default"
<Directory /var/www/redmine/public>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

I used this manual http://www.x2on.de/2011/04/23/tutorial-redmine-with-git-and-gitosis-on-ubuntu-11-04/ It has details but you can follow it.

Running the test works.
you go to cd /var/www/redmine
and by doing

ruby script/server webrick -e production

In the browser I put http://redmine:3000 and works
Hopefully someone can lend us a hand.