Project

General

Profile

[SOLVED] Debian 6, Redmine 2, Passenger install problem

Added by Perrier T about 11 years ago

I have some problem upgrading from redmine 1.3 to 2.2.1. After following the instructions on the RedmineUpgrade redmine shows me a Rails (passenger) exception page that says something I don't understand about dependencies:

Backtrace:
#    File    Line    Location
0    /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb    251    in `require'
1    /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb    251    in `require'
2    /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb    236    in `load_dependency'
3    /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb    251    in `require'
4    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb    312    in `preload_application'

I have a redmine version as follows:

Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.0)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.4)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activeresource (3.2.11)
Using coderay (1.0.8)
Using fastercsv (1.5.5)
Using fcgi (0.8.8)
Using rack-ssl (1.3.2)
Using json (1.7.6)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.11)
Using jquery-rails (2.0.3)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Using ruby-openid (2.1.8)
Using rack-openid (1.3.1)
Using bundler (1.2.3)
Using rails (3.2.11)
Using rmagick (2.13.1)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Environment:
  Redmine version                          2.1.6.stable.11197
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.11
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  no plugin installed
Rails 3.2.11
Debian Linux 6.06 x86_64
MySQL Server version: 5.1.49-3 (Debian)
libapache2-mod-passenger 2.2.11debi

*** Exception LoadError in PhusionPassenger::Railz::ApplicationSpawner (no such file to load -- dispatcher) (process 3370)
:
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
        from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:312:in `preload_application'
        from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:252:in `initialize_server'
        from /usr/lib/ruby/1.8/phusion_passenger/utils.rb:255:in `report_app_init_status'
        from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:237:in `initialize_server'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:194:in `start_synchronously'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
        from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
        from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
        from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
        from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
        from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
        from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
        from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
        from /usr/lib/phusion_passenger/passenger-spawn-server:61

Please tell me how to solve this!
Thanks, Perrier


Replies (10)

RE: Debian 6 and Redmine 2 install problem - Added by Jan Niggemann (redmine.org team member) about 11 years ago

You have a plugin installed that requires dispatcher (require 'dispatcher').
But dispatcher is no longer available in Rails 3.
Move all plugins out of the installation and restart redmine. Or go to redmine/plugins and grep -R to find out which plugin/s is/are concerned and move only those...

Look here for more info...

RE: Debian 6 and Redmine 2 install problem - Added by Perrier T about 11 years ago

Thanks for your help. I don't have any plugins but I did a search for anything with dispatcher. Unfornately nothing interesting has been found, only two example files. What else could be the problem?

Jan Niggemann wrote:

You have a plugin installed that requires dispatcher (require 'dispatcher').
But dispatcher is no longer available in Rails 3.
Move all plugins out of the installation and restart redmine. Or go to redmine/plugins and grep -R to find out which plugin/s is/are concerned and move only those...

Look here for more info...

RE: Debian 6 and Redmine 2 install problem - Added by Perrier T about 11 years ago

I still couldn't start redmine, now it says:

Exiting
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:147:in `gem': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError)

Of course I've tried to gem install mysql2, created Gemfile local with mysql2 and checked if I have a database_url environment variable. Nothing helps.
Now I would be happy with a fresh, clean, all-new redmine 2.2 stable install. Please tell me how can I achieve this on a debian 6.

RE: Debian 6 and Redmine 2 install problem - Added by Perrier T about 11 years ago

ok, fixed the mysql2 bug, I've added the same version to the Gemfile.local that was already installed:

gem 'mysql2','~>0.3.11'

Now I'm at the beginning again: no such file to load -- dispatcher

RE: Debian 6 and Redmine 2 install problem - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Must work but I'll post detailed instructions here in about 2h...

RE: Debian 6 and Redmine 2 install problem - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Sorry for the delay.
My suggestion is you uninstall everything and re-install from scratch.
You're on Debian and can use my brand new guide.

RE: Debian 6 and Redmine 2 install problem - Added by Perrier T about 11 years ago

Thanks, your guide helped me a lot. But I still have a question as my site is still not running. :(
I have its VirtualHost in apache config as follows:

<VirtualHost *:80>
    ServerAdmin webmaster@xxxxxxx.xx
    ServerName uc.xxxxxxx.xx
    ServerAlias uc.xxxxxxx.xx
    DocumentRoot /opt/redmine
    ErrorLog /var/www/xxxxxxx.xx/logs/redmine_error.log
    CustomLog /var/www/essenced.xxxxxxx.xx/logs/redmine_access.log combined
    <Directory /public>
        RailsEnv production
        RailsBaseURI /public
#       PassengerResolveSymlinksInDocumentRoot on
        Options -MultiViews
    </Directory>
</VirtualHost>

Navigating the uc.xxxxxxx.xx address shows a 404. I have tried giving different paths at DocRoot, Directory, RailsBaseURI but nothing worked. My old working site used to have a virtualhost config with these values:

<VirtualHost *:80>
    ServerAdmin webmaster@xxxxxxx.xx
    ServerName bug.xxxxxxx.xx
    ServerAlias bug.xxxxxxx.xx
    DocumentRoot /opt/redmine-1.3.0/public
    ErrorLog /var/www/xxxxxxx.xx/logs/redmine_error.log
    CustomLog /var/www/xxxxxxx.xx/logs/redmine_access.log combined
    <Directory /opt/redmine-1.3.0/public>
        RailsBaseURI /
        PassengerResolveSymlinksInDocumentRoot on
    </Directory>
</VirtualHost>

Could you please place me to the right direction once again? Except Virtualhosts I've installed redmine by your guide and everything went good.
Thanks, Peter

Jan Niggemann wrote:

Sorry for the delay.
My suggestion is you uninstall everything and re-install from scratch.
You're on Debian and can use my brand new guide.

RE: Debian 6 and Redmine 2 install problem - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Err, not my field of expertise... DocumentRoot does not point to the public folder and does not match Directory - try this:

<VirtualHost *:80>
    ServerAdmin webmaster@xxxxxxx.xx
    ServerName uc.xxxxxxx.xx
    ServerAlias uc.xxxxxxx.xx
    DocumentRoot /opt/redmine/public
    ErrorLog /var/www/xxxxxxx.xx/logs/redmine_error.log
    CustomLog /var/www/essenced.xxxxxxx.xx/logs/redmine_access.log combined
    <Directory /opt/redmine/public>
        RailsEnv production
        RailsBaseURI /
        Options -MultiViews
    </Directory>
</VirtualHost>

RE: Debian 6 and Redmine 2 install problem - Added by Perrier T about 11 years ago

Thanks for your efforts, finally I have it running, but there was some point where I was stucked.
My working VirtualHost config looks like this:

<VirtualHost *:80>
    ServerAdmin webmaster@xxxxxxxx.xx
    ServerName redmine.xxxxxxxx.xx
    ServerAlias redmine.xxxxxxxx.xx
    DocumentRoot /opt/redmine/public
    ErrorLog /var/www/xxxxxxxx.xx/logs/redmine_error.log
    CustomLog /var/www/xxxxxxxx.xx/logs/redmine_access.log combined
    PassengerEnabled On
    PassengerLogLevel 3
    <Directory /opt/redmine/public>
        AllowOverride all
        RailsBaseURI /public
        Options -MultiViews
    </Directory>
</VirtualHost>

I think there is a small bug in your guide with the apache passenger config. As far as I can remember the passenger.conf file should contain version 3.0.18 by your guide but the installed one was 3.0.19. It would be better not to mention version numbers because this way the passengerroot property pointed to a missing directory.
Other problem is that PassengerWatchdog was not installed by gem install passenger. It had to be added manually by the binary package and symlinked to the passengerroot directory.

Anyway, thank you again for your help,
Peter

Jan Niggemann wrote:

Err, not my field of expertise... DocumentRoot does not point to the public folder and does not match Directory - try this:
[...]

RE: Debian 6 and Redmine 2 install problem - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Perrier T wrote:

I think there is a small bug in your guide with the apache passenger config. As far as I can remember the passenger.conf file should contain version 3.0.18 by your guide but the installed one was 3.0.19. It would be better not to mention version numbers because this way the passengerroot property pointed to a missing directory.

The guide mentions that explicitly (emphasis mine):

And put this in /etc/apache/mods-available/passenger.conf (remember to adjust the paths if necessary).

    (1-10/10)