[SOLVED] Issue when installing redmine 2.2.2 on apache (dispatch not found)
Added by Pierre Roth over 11 years ago
Hi,
Installed redmine 2.2.2 from sources on a 12.04 Ubuntu machine.
When I start the redmine instance through the dev server, it works perfectly:
pr@ubuntu:/home/server/redmine-2.2.2$ sudo ruby script/rails server webrick -e production => Booting WEBrick => Rails 3.2.11 application starting in production on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2013-01-23 11:17:19] INFO WEBrick 1.3.1 [2013-01-23 11:17:19] INFO ruby 1.8.7 (2011-06-30) [i686-linux] [2013-01-23 11:17:24] INFO WEBrick::HTTPServer#start: pid=27072 port=3000 Started GET "/" for 127.0.0.1 at Wed Jan 23 11:17:35 +0100 2013 Processing by WelcomeController#index as HTML Current user: rothp (id=3) Rendered welcome/index.html.erb within layouts/base (46.6ms) Completed 200 OK in 295ms (Views: 155.4ms | ActiveRecord: 9.7ms)
I'm now trying to setup apache to serve this working redmine app.
Here's my virtualhost config:
<VirtualHost *:80> ServerAdmin myemail@mydomain.org ServerName dev.myserver DocumentRoot /home/server RailsEnv production RailsBaseURI /redmine <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/server/redmine/> Options Indexes FollowSymLinks -MultiViews AllowOverride None Order deny,allow allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost>
Here's the error when accessing redmine home page with my web browser:
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: /home/server/redmine-2.2.2 Backtrace: # File Line Location 0 /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 251 in `require' 1 /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 251 in `require' 2 /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 236 in `load_dependency' 3 /var/lib/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' 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
Any ideas?
Thanks a lot!
Pierre
Replies (13)
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Jan Niggemann (redmine.org team member) over 11 years ago
Rails 3 introduced a different patching mechanism (to_prepare), require 'dispatcher' no longer works.
Do you have any plugins installed?
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Pierre Roth over 11 years ago
Don't have any plugins installed...
pr@ubuntu: /home/server/redmine-2.2.2$ sudo RAILS_ENV=production script/about Environment: Redmine version 2.2.2.stable Ruby version 1.8.7 (i686-linux) Rails version 3.2.11 Environment production Database adapter SQLite Redmine plugins: no plugin installed
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Jan Niggemann (redmine.org team member) over 11 years ago
Oh, I know, your passenger is probably too outdated. If passenger-config --version
< 3.0.17 then update your version of passenger...
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Pierre Roth over 11 years ago
My passenger version seems ok...
pr@ubuntu: /home/server/redmine-2.2.2$ passenger-config --version 3.0.19
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Jan Niggemann (redmine.org team member) over 11 years ago
Then I'm out of ideas, sorry...
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Etienne Massip over 11 years ago
Pierre Roth wrote:
<Directory /home/server/redmine/>
Should be /home/server/redmine-2.2.2, right?
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Pierre Roth over 11 years ago
I made a symlink for that. Please note that I've got a dispatch.fcgi file (renamed from the distributed one dispatch.fcgi.example)...
pr@ubuntu:/home/server$ ll total 72 drwxr-xr-x 12 www-data dev 4096 janv. 23 10:40 ./ drwxr-xr-x 19 root root 4096 janv. 22 08:10 ../ lrwxrwxrwx 1 www-data dev 20 janv. 23 10:40 redmine -> redmine-2.2.2/public/ drwxr-xr-x 17 www-data dev 4096 janv. 22 13:03 redmine-2.2.2/ drwxr-xr-x 5 www-data dev
Still digging... thanks a for your help guys...
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Etienne Massip over 11 years ago
Pierre Roth wrote:
I made a symlink for that. Please note that I've got a dispatch.fcgi file (renamed from the distributed one dispatch.fcgi.example)...
You should not need one if Passenger is in use?
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Pierre Roth over 11 years ago
Yes, you're rigth. I thinks it's an apache configuration issue since my redmine instance is working fine when running through the ruby script/rails server webrick -e production
command.
There's a libapache2-mod-passenger apache module on my 12.04LTS ubuntu machine which version is 2.2.11debian-2. Could the problem be here ?
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Etienne Massip over 11 years ago
I guess it could. Removing the dispatch.fcgi would make it work with Passenger, wouldn't it?
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Pierre Roth over 11 years ago
I removed the file and restarted Apache2. Same error. I'm really not a ruby expert: it seems that a dispatch module cannot be found (please refer to my first post for full stasktrace)
0 /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 251 in require'
RE: Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Pierre Roth over 11 years ago
Hi,
Found the solution.
Changed:
RailsBaseURI /redmine
to:
RackBaseURI /redmine
in my apache2 conf.
Thanks for your time and support guys
RE: [SOLVED] Issue when installing redmine 2.2.2 on apache (dispatch not found)
-
Added by Junyu Jiang over 11 years ago
I have same symptom, but can not fix it by above method.
I found when I typed
$ passenger-config --root $ /usr
It seems the passenger configuration has some problem.
Since my system is Ubuntu 10.04 LTS, so I followed
http://www.modrails.com/documentation/Users%20guide%20Apache.html
to install
sudo apt-add-repository ppa:brightbox/passenger sudo apt-get update sudo apt-get install libapache2-mod-passenger
And then it just work!.