0

I've installed redmine 2.1 on a server (Ubuntu 12.04 LTS) which now produces the 500 Server error message.

I've configured to use apache passenger and installed via

xxxx:/usr/local/vhost/redmine# ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]


gem --version
1.8.15


xxxxx:/usr/local/vhost/redmine/log# bundle --version
Bundler version 1.2.3


Started GET "/" for 217.247.62.52 at Sat Jan 05 13:39:34 +0000 2013
Processing by WelcomeController#index as HTML
Completed 500 Internal Server Error in 1ms

NoMethodError (undefined method `accept' for nil:NilClass):
  app/models/setting.rb:152:in `check_cache'
  app/controllers/application_controller.rb:82:in `user_setup'

My database.yml adapter is already on mysql2:

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: root
  password: *****
  encoding: utf8

but this seemed to be wrong, cause i'm using ruby 1.8.7 and not 1.9.X.

Does someone has an idea where to look?

Update After retrying i got the following message from passgen on the web-site:

Error message:
    no such file to load -- dispatcher
Exception class:
    LoadError
/var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb   251     in `require'
1   /var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb   251     in `require'
2   /var/lib/gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb   236     in `load_dependency'
3   /var/lib/gems/1.8/gems/activesupport-3.2.8/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
khmarbaise
  • 92,914
  • 28
  • 189
  • 235

3 Answers3

4

As @khmarbaise states, his link gave me the solution:

Behind the link we find that Passenger treats the rails-application as a rack-application now, thus a apache2-config which was:

RailsBaseURI /redmine

should now be

RackBaseURI /redmine

This made it work for me (source)

nwellnhof
  • 32,319
  • 7
  • 89
  • 113
Patrick B.
  • 11,773
  • 8
  • 58
  • 101
1

It was partially the answer of @Michael Witrant cause after searching a while i found the following link which broad me to the correct steps. After changing this using the recommended entries in the apache configuration i changed the configuration from mysql2 to mysql adapter in database.yml file and it works.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
0

You may have the same problem as in this question: Rails 3: Model.all => NoMethodError: undefined method 'accept' for nil:NilClass

Try to use the mysql2 adapter instead of mysql in database.yml.

Community
  • 1
  • 1
Michaël Witrant
  • 7,525
  • 40
  • 44