2013-02-01 61 views
2

我試圖通過瘦部署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 start薄啓動成功,但是,如果我嘗試通過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 

回答

0

我無法解決這個問題,最終重新安裝了Thin和Redmine。我認爲在某個地方有一個糟糕的寶石。