<?xml version="1.0" encoding="UTF-8"?>
<issue>
  <id>1714</id>
  <project name="Redmine" id="1"/>
  <tracker name="Defect" id="1"/>
  <status name="Closed" id="5"/>
  <priority name="Normal" id="4"/>
  <author name="Pieter Claerhout" id="1733"/>
  <category name="Wiki" id="1"/>
  <subject>Phusion Passenger and RailsSpawnMethod</subject>
  <description>I've installed RedMine on my Macintosh OS X machine using Apache 2 and Phusion Passenger.
 
However, when I access the homepage, I get the following error:

&lt;pre&gt;
Error message:
    superclass must be a Class (Module given)
Exception class:
    TypeError
Application root:
    /redmine
&lt;/pre&gt;

When I change the RailsSpawnMethod setting of Passenger to "conservative", it works just fine (but slower).

I'm using:
* Mac OS X 10.5.4
* Apache 2.2.8
* Ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
* Rails 2.1.0
* Redmine from svn (r1709)

The Apache config that does not work:

&lt;pre&gt;
# Load mod_passenger
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.0.2
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

# Load redmine
RailsBaseURI /redmine
&lt;/pre&gt;

The Apache config that does work:

&lt;pre&gt;
# Load mod_passenger
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.0.2
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

# Configure mod_passenger
RailsSpawnMethod conservative

# Load redmine
RailsBaseURI /redmine
&lt;/pre&gt;

I've attached a screenshot with more information about the error.</description>
  <start_date>2008-07-30</start_date>
  <due_date></due_date>
  <done_ratio>0</done_ratio>
  <estimated_hours></estimated_hours>
  <custom_fields>
    <custom_field name="Affected version" id="1">devel</custom_field>
    <custom_field name="Resolution" id="2">Duplicate</custom_field>
  </custom_fields>
  <created_on>Wed Jul 30 14:11:59 +0200 2008</created_on>
  <updated_on>Mon Aug 25 14:00:06 +0200 2008</updated_on>
  <journals>
    <journal id="4203">
      <user name="Billy Ma" id="1769"/>
      <notes>I was able to duplicate the problem on my Mac OS X.

This problem is related to RedCloth. I was told that RedCloth did a complete rewrite of their code with version 3.0.4, which Redmine depends on.

You can do one of the following to solve the problem:
1. Remove all the previous version of RedCloth and keep version 3.0.4.
2. Remove all versions of RedCloth and use the file that comes with Redmine

You should be able to run it with any problem.</notes>
      <details>
      </details>
    </journal>
    <journal id="4213">
      <user name="Pieter Claerhout" id="1733"/>
      <notes>I removed all versions of RedCloth I've had installed and now it's working fine.

What's strange however that the only versions I had installed were 3.0.4 and 4.0.1.
</notes>
      <details>
        <detail old="1" name="status_id" property="attr" new="3"/>
      </details>
    </journal>
    <journal id="4396">
      <user name="Gerrit Kaiser" id="1884"/>
      <notes>Pieter Claerhout wrote:
&gt; I removed all versions of RedCloth I've had installed and now it's working fine.
&gt; 
&gt; What's strange however that the only versions I had installed were 3.0.4 and 4.0.1.

RedCloth had a major update with 4.0, so no surprise it breaks. Weird is, however, that Redmine apparently only tries loads version 4 of the RedCloth gem when running under Passenger.

So this might well be a Passenger bug, not a Redmine one, but I don't think this issue is resolved yet. Uninstalling RedCloth is a workaround at best.</notes>
      <details>
      </details>
    </journal>
    <journal id="4397">
      <user name="Gerrit Kaiser" id="1884"/>
      <notes>related to http://www.redmine.org/issues/show/1754</notes>
      <details>
      </details>
    </journal>
    <journal id="4473">
      <user name="Jean-Philippe Lang" id="1"/>
      <notes>This is not related to Phusion Passenger, the exact problem is described in #1754.</notes>
      <details>
        <detail old="" name="category_id" property="attr" new="1"/>
        <detail old="3" name="status_id" property="attr" new="5"/>
        <detail old="" name="2" property="cf" new="Duplicate"/>
      </details>
    </journal>
  </journals>
</issue>
