我已经在服务器(Ubuntu 12.04 LTS)上安装了 redmine 2.1,它现在会产生 500 Server 错误消息。
我已配置为使用 apache 乘客并通过安装
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'
我的 database.yml 适配器已经在 mysql2 上:
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password: *****
encoding: utf8
但这似乎是错误的,因为我使用的是 ruby 1.8.7 而不是1.9.X。
有人知道在哪里看吗?
更新 重试后,我从网站上的 passgen 收到以下消息:
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