2

我正在尝试通过 Thin 部署 Redmine 2.x,但遇到了几个不同的问题。首先是,通过 webrick 进行测试时,我可以成功地匿名导航 Redmine。我什至可以登录,但是在提交表单后我收到一个应用程序错误。这是production.log相关部分:

Successful authentication for 'admin' from 97.79.126.223 at Fri Feb 01 00:14:04 UTC 2013
Redirected to http://54.235.144.11:3000/
Completed 302 Found in 67ms (ActiveRecord: 37.3ms)

NoMethodError (undefined method `options' for {:ctime=>1359677644, :user_id=>1, :atime=>1359677644}:Hash):
rack (1.5.1) lib/rack/session/abstract/id.rb:321:in `commit_session'
rack (1.5.1) lib/rack/session/abstract/id.rb:218:in `context'
rack (1.5.1) lib/rack/session/abstract/id.rb:212:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.11) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `_run__750860825__call__4__callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.11) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.5.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.5.1) lib/rack/lock.rb:17:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.11) lib/rails/engine.rb:479:in `call'
railties (3.2.11) lib/rails/application.rb:223:in `call'
rack (1.5.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.5.1) lib/rack/handler/webrick.rb:60:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.5.1) lib/rack/handler/webrick.rb:14:in `run'
rack (1.5.1) lib/rack/server.rb:264:in `start'
railties (3.2.11) lib/rails/commands/server.rb:70:in `start'
railties (3.2.11) lib/rails/commands.rb:55
railties (3.2.11) lib/rails/commands.rb:50:in `tap'
railties (3.2.11) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6

我在使用 Thin 和 Webrick 部署时都收到了这个错误。无论它是如何部署的,我以前从未遇到过 redmine 的此错误。

我面临的另一个问题是如何启动瘦服务器。但是,当我在 Rails 目录中并供应sudo thin startThin 成功启动时,如果我尝试通过以下方式启动 Thin,sudo /etc/init.d/thin start我会收到这个可爱的错误

>> Exiting!
/usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:528:in `start_unix_server': no unix-domain acceptor (RuntimeError)
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:528:in `start_server'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:548:in `start_unix_domain_server'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/unix_server.rb:19:in `connect'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:187:in `send'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/bin/thin:6
    from /usr/bin/thin:19:in `load'
    from /usr/bin/thin:19

这是我的 redmine.yml 瘦配置文件

servers: 3
chdir: /www/redmine.guidelinecentral.com
user: apache
log: /var/log/thin/redmine.log
daemonize: true
pid: /var/run/thin/redmine.pid
group: apahce
require: []

timeout: 30
wait: 30
max_persistent_conns: 100
socket: /var/run/redmine/sockets/thin.sock
max_conns: 1024
environment: production
4

1 回答 1

0

I was not able to solve this issue and ended up doing a reinstall of both Thin and Redmine. I think there was a bad gem somewhere.

于 2013-02-09T21:49:41.843 回答