2012-04-16 53 views
0

我最近從Trav 0.12遷移到Redmine 1.4.0。 從RRAC數據遷移後,管理平臺,我得到這個錯誤:Redmine:用戶配置文件視圖中出錯[mysql]

Processing UsersController#show (for xx.xxx.xx.xxx at 2012-04-16 12:45:36) [GET] 


Parameters: {"id"=>"4", "action"=>"show", "controller"=>"users"} 

NoMethodError (undefined method `<=>' for nil:NilClass): 
    lib/redmine/activity/fetcher.rb:80:in `events' 
    lib/redmine/activity/fetcher.rb:80:in `sort!' 
    lib/redmine/activity/fetcher.rb:80:in `events' 
    app/controllers/users_controller.rb:68:in `show' 
    thin (1.3.1) lib/thin/connection.rb:80:in `pre_process' 
    thin (1.3.1) lib/thin/connection.rb:78:in `catch' 
    thin (1.3.1) lib/thin/connection.rb:78:in `pre_process' 
    thin (1.3.1) lib/thin/connection.rb:53:in `process' 
    thin (1.3.1) lib/thin/connection.rb:38:in `receive_data' 
    eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine' 
    eventmachine (0.12.10) lib/eventmachine.rb:256:in `run' 
    thin (1.3.1) lib/thin/backends/base.rb:61:in `start' 
    thin (1.3.1) lib/thin/server.rb:159:in `start' 
    thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start' 
    thin (1.3.1) lib/thin/runner.rb:185:in `send' 
    thin (1.3.1) lib/thin/runner.rb:185:in `run_command' 
    thin (1.3.1) lib/thin/runner.rb:151:in `run!' 
    thin (1.3.1) bin/thin:6 
    /usr/bin/thin:23:in `load' 
    /usr/bin/thin:23 

Rendering /mnt/storage/redmine/public/500.html (500 Internal Server Error) 

我是新來的紅寶石,誰能幫助我?

注意here是非常類似的問題描述。在我的情況下,我改用MySQL數據庫。

回答

0

補丁到migrate_from_trac.rake

class ::Time 
    class << self 
     alias :real_at :at 
     alias :real_now :now 
     # Fixing import for trac 0.12 
     def at(time) 
     d = nil 
     if time > 10000000000 then 
      d = real_at(time/1000000, time % 1000000) 
     else 
      d = real_at(time) 
     end 
     d 
     end 
     def now 
     real_now - @fake_diff.to_i 
     end 
     def fake(time) 
     time = 0 if time.nil? 
     @fake_diff = real_now - time 
     res = yield 
     @fake_diff = 0 
     res 
     end 
    end 
    end 
相關問題