[solved] Redmine 2.4.5 - Ubuntu 12.04 - apache 2.2: Phusion passenger: no such file to load -- dispatcher
Added by Miquel Coll over 10 years ago
I've migrated from redmine 1.3.4 to 2.4.5.
If I test redmine with webrick all goes fine:
ruby script/rails server webrick -e production
But If I start it with apache I get this error:
This is the full text of the error:
Ruby on Rails application could not be started A source file that the application requires, is missing. It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded. A required library may not installed. Please install all libraries that this application requires. Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem. Error message: no such file to load -- dispatcher Exception class: LoadError Application root: /app/redmine-2.4.5 Backtrace: # File Line Location 0 /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 251 in `require' 1 /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 251 in `require' 2 /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 236 in `load_dependency' 3 /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 251 in `require' 4 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 312 in `preload_application' 5 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 252 in `initialize_server' 6 /usr/lib/ruby/1.8/phusion_passenger/utils.rb 255 in `report_app_init_status' 7 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 237 in `initialize_server' 8 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 194 in `start_synchronously' 9 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 163 in `start' 10 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 213 in `start' 11 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application' 12 /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add' 13 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application' 14 /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 80 in `synchronize' 15 /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' 16 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application' 17 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 154 in `spawn_application' 18 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application' 19 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 352 in `__send__' 20 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 352 in `main_loop' 21 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 196 in `start_synchronously' 22 /usr/lib/phusion_passenger/passenger-spawn-server 61
My production log is this:
Connecting to database specified by database.yml Creating scope :system. Overwriting existing method Enumeration.system. Creating scope :sorted. Overwriting existing method Group.sorted. Creating scope :sorted. Overwriting existing method User.sorted.
And my environment:
# ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] # rails --version Rails 2.3.14 # uname -a Linux l3-ubuntu-12 3.5.0-52-generic #78~precise1-Ubuntu SMP Wed Jun 11 17:14:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS" MySQL version: 5.5.37-0ubuntu0.12.04.1
I checked several similar posts with no luck, specially this one:
[[http://www.redmine.org/boards/2/topics/40864]]
But I checked my Gemfile and it's identical as [[http://www.redmine.org/projects/redmine/repository/entry/tags/2.4.5/Gemfile]]
Any suggestions?
Kind regards
redmine-2.png (99.3 KB) redmine-2.png |
Replies (2)
RE: Redmine 2.4.5 - Ubuntu 12.04 - apache 2.2: Phusion passenger: no such file to load -- dispatcher - Added by Miquel Coll over 10 years ago
This is my Apache error log, saying the LoadError is in PhusionPassenger::Railz::ApplicationSpawner:
*** Exception LoadError in PhusionPassenger::Railz::ApplicationSpawner (no such file to load -- dispatcher) (process 1683): from /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require' from /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require' from /var/lib/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency' from /var/lib/gems/1.8/gems/activesupport-3.2.17/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
RE: Redmine 2.4.5 - Ubuntu 12.04 - apache 2.2: Phusion passenger: no such file to load -- dispatcher - Added by Miquel Coll over 10 years ago
I answer my own question :-)
After further investigation I found a similar problem here
http://makandracards.com/makandra/815-fix-loaderror-with-rails-3-applications-on-passenger
Although it's for Rails 3 and I'm using Rails 2.3.14, I decided to try it:
sudo gem install passenger sudo passenger-install-apache2-module
Once installed, I've to change the passenger.load and passenger.conf files in /etc/apache2/mods-available in order to use the new passenger version:
passenger.load
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
passenger.conf
<IfModule mod_passenger.c> PassengerDefaultUser www-data PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.45 PassengerDefaultRuby /usr/bin/ruby1.8 </IfModule>
Ensure you have mod_passenger enabled (a2enmod passenger) and restart apache to get it work!