Redmine Troubles with Apache ( New Install )
Added by Jim Summers over 14 years ago
Hello All,
I am trying to get redmine-0.9.3 running under apache2 on a RHEL4 system. The webrick testing works fine. But when I try to access redmine through httpd I am seeing the following:
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] /usr/local/redmine-0.9.3/public/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18]
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] /usr/local/redmine-0.9.3/public/../config/../vendor/rails/railties/lib/initializer.rb:272:in `require_frameworks'
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] :
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] Could not find RubyGem rack (~> 1.0.1)
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] (
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] RuntimeError
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] )
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] \tfrom /usr/local/redmine-0.9.3/public/../config/../vendor/rails/railties/lib/initializer.rb:135:in `process'
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] \tfrom /usr/local/redmine-0.9.3/public/../config/../vendor/rails/railties/lib/initializer.rb:114:in `send'
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] \tfrom /usr/local/redmine-0.9.3/public/../config/../vendor/rails/railties/lib/initializer.rb:114:in `run'
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] \tfrom /usr/local/redmine-0.9.3/public/../config/environment.rb:20
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] \tfrom /usr/local/redmine-0.9.3/public/dispatch.cgi:3:in `require'
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] \tfrom /usr/local/redmine-0.9.3/public/dispatch.cgi:3
[Tue Mar 16 09:29:41 2010] [error] [client 10.194.10.18] Premature end of script headers: dispatch.cgi
Here is some info on my install:
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (i686-linux)
RubyGems version 1.3.6
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /usr/local/redmine-0.9.3
Environment production
Database adapter mysql
Database schema version 20100221100219
and
rails --version
Rails 2.3.5
ruby --version
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]
gem list
- LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
mysql (2.8.1)
rack (1.1.0, 1.0.1)
rails (2.3.5)
rake (0.8.7)
I am not sure what the problem is. It appears that I have the correct version of rack installed?
Ideas?
Thanks
Replies (8)
RE: Redmine Troubles with Apache ( New Install )
-
Added by Jim Summers over 14 years ago
I also have tried to run the dispatch from a terminal. With the correct ruby in the path, I am still getting the errors listed above.
Ideas / Suggestions?
TIA
RE: Redmine Troubles with Apache ( New Install )
-
Added by Jim Summers over 14 years ago
I have now used the gem command to uninstall rack-1.1.0. Here is the gem list output now:
- LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
fastthread (1.0.7)
mysql (2.8.1)
passenger (2.2.11)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
I also installed passenger and it say the rails application can not start because:
Error message:
Could not find RubyGem rack (~> 1.0.1)
Exception class:
RuntimeError
Application root:
/usr/local/redmine-0.9.3
What is the Application root: I have set the DocumentRoot to: /usr/local/redmine-0.9.3/public
Ideas?
Thanks
RE: Redmine Troubles with Apache ( New Install )
-
Added by Holger Just over 14 years ago
Jim,
Your version of Rack is not correct. You need Rack 1.0.x with x >= 1. So 1.0.1 is sufficient while 1.0.0 and 1.1 are not. This is what the tilde says: the very last part of the version string can be equal or larger than the stated one. All the others must be equal to the stated numbers.
So just try the following on your console:
sudo gem install rack -v=1.0.1
--Holger
RE: Redmine Troubles with Apache ( New Install )
-
Added by Jim Summers over 14 years ago
Thanks Holger.
I just did the following:
gem install rack -v=1.0.1
Successfully installed rack-1.0.1
1 gem installed
Installing ri documentation for rack-1.0.1...
Installing RDoc documentation for rack-1.0.1...
But still no joy.
Here is what I see when running public/dispatch.cgi:
public/dispatch.cgi
./public/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/usr/local/ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/dispatcher.rb:24: warning: already initialized constant Dispatcher
/usr/local/redmine-0.9.3/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:22:in `__send__': undefined method `env_table' for nil:NilClass (NoMethodError)
from /usr/local/redmine-0.9.3/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:22:in `dispatch_cgi'
from /usr/local/redmine-0.9.3/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
from /usr/local/redmine-0.9.3/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:27:in `dispatch'
from public/dispatch.cgi:11
And when attempting to access it from a web browser I still get:
Error message:
Could not find RubyGem rack (~> 1.0.1)
Exception class:
RuntimeError
Application root:
/usr/local/redmine-0.9.3
- LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
fastthread (1.0.7)
mysql (2.8.1)
passenger (2.2.11)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
Which does show the rack-1.0.1
I am stumped!
Ideas?
TIA
RE: Redmine Troubles with Apache ( New Install )
-
Added by Holger Just over 14 years ago
Are you sure you installed the GEM to the global repository? If Gem install can not write to it, it silently installs the new gem to ~/.gem
. If you now run Redmine under another user as the one you installed the gem in, it will not find the gem.
Also, you might want to try Passenger if possible. I have seen a lot of people having problems with their fcgi setups lately. Most of them have succeeded by using passenger.
The CGI-Method you used is greatly discouraged, as it is incredibly slow. You would face at least 1-2 seconds response times for each request. The other deployment methods are facing that only on the first request.
RE: Redmine Troubles with Apache ( New Install )
-
Added by Jim Summers over 14 years ago
I am running passenger. Here is the backtrace it gives:
Backtrace:- File Line Location
0 /usr/local/redmine-0.9.3/vendor/rails/railties/lib/initializer.rb 272 in `require_frameworks'
1 /usr/local/redmine-0.9.3/vendor/rails/railties/lib/initializer.rb 135 in `process'
2 /usr/local/redmine-0.9.3/vendor/rails/railties/lib/initializer.rb 114 in `send'
3 /usr/local/redmine-0.9.3/vendor/rails/railties/lib/initializer.rb 114 in `run'
4 /usr/local/redmine-0.9.3/config/environment.rb 20
5 /usr/local/ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
6 /usr/local/ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
7 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 303 in `preload_application'
8 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 252 in `initialize_server'
9 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/utils.rb 255 in `report_app_init_status'
10 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 237 in `initialize_server'
11 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 194 in `start_synchronously'
12 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 163 in `start'
13 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 213 in `start'
14 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application'
15 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add'
16 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application'
17 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb 80 in `synchronize'
18 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
19 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application'
20 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 154 in `spawn_application'
21 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application'
22 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 352 in `__send__'
23 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 352 in `main_loop'
24 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 196 in `start_synchronously'
25 /usr/local/ruby187/lib/ruby/gems/1.8/gems/passenger-2.2.11/bin/passenger-spawn-server 61
Where is the global repository for the GEM? I am doing this all as the root user, so I am guessing it has the permissions necessary.
Thanks again!
RE: Redmine Troubles with Apache ( New Install )
-
Added by Holger Just over 14 years ago
The default Ruby on RedHat uses something along of /usr/lib/ruby/gems/1.8/gems
. In your case you should look around /usr/local/ruby187/lib/ruby/gems/1.8/gems
. Make sure to configure passenger to use the correct ruby.
Also check that if you use the gem
binary, it is the one from the used ruby. In your case it would be located around /usr/local/ruby187/bin/gem
.
RE: Redmine Troubles with Apache ( New Install )
-
Added by Jim Summers over 14 years ago
RESOLVED!!!! WooHoo!!
When I had initially set up the webserver for this I had set the owner and group to the webserver user. But I think at some point going back and forth with the proper rack version the install had reset the ownerships back to root. By resetting all back to the webserver user it is running now.
Thanks Again!