2012-01-26 45 views
1

我剛剛安裝了rvm並使用rvm將紅寶石從1.8.7升級到1.9.2。我在我的應用上運行了bundle install,它重新安裝了我的寶石。當我運行軌道服務器在本地和導航瀏覽器爲localhost:3000,以下錯誤在服務器日誌中顯示出來:將紅寶石從1.8.7升級到1.9.2後本地服務器錯誤(使用Rails 3.1.1)

Started GET "/" for 127.0.0.1 at 2012-01-25 20:10:12 -0800 

TypeError (class Date needs to have method `_load'): 


Rendered /Users/nicks/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms) 
Rendered /Users/nicks/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms) 
Rendered /Users/nicks/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (4.2ms) 

我有點軌小白的,所以請原諒我的無知。任何幫助將非常感激。

下面是完整的跟蹤:

activesupport (3.1.1) lib/active_support/message_verifier.rb:34:in `load' 
activesupport (3.1.1) lib/active_support/message_verifier.rb:34:in `verify' 
actionpack (3.1.1) lib/action_dispatch/middleware/cookies.rb:280:in `[]' 
actionpack (3.1.1) lib/action_dispatch/middleware/session/cookie_store.rb:53:in `block in unpacked_cookie_data' 
actionpack (3.1.1) lib/action_dispatch/middleware/session/abstract_store.rb:55:in `stale_session_check!' 
actionpack (3.1.1) lib/action_dispatch/middleware/session/cookie_store.rb:51:in `unpacked_cookie_data' 
rack (1.3.5) lib/rack/session/cookie.rb:96:in `extract_session_id' 
actionpack (3.1.1) lib/action_dispatch/middleware/session/abstract_store.rb:51:in `block in extract_session_id' 
actionpack (3.1.1) lib/action_dispatch/middleware/session/abstract_store.rb:55:in `stale_session_check!' 
actionpack (3.1.1) lib/action_dispatch/middleware/session/abstract_store.rb:51:in `extract_session_id' 
rack (1.3.5) lib/rack/session/abstract/id.rb:43:in `load_session_id!' 
rack (1.3.5) lib/rack/session/abstract/id.rb:32:in `[]' 
rack (1.3.5) lib/rack/session/abstract/id.rb:252:in `current_session_id' 
rack (1.3.5) lib/rack/session/abstract/id.rb:258:in `session_exists?' 
rack (1.3.5) lib/rack/session/abstract/id.rb:104:in `exists?' 
rack (1.3.5) lib/rack/session/abstract/id.rb:114:in `load_for_read!' 
rack (1.3.5) lib/rack/session/abstract/id.rb:64:in `has_key?' 
actionpack (3.1.1) lib/action_dispatch/middleware/flash.rb:260:in `ensure in call' 
actionpack (3.1.1) lib/action_dispatch/middleware/flash.rb:261:in `call' 
rack (1.3.5) lib/rack/session/abstract/id.rb:195:in `context' 
rack (1.3.5) lib/rack/session/abstract/id.rb:190:in `call' 
actionpack (3.1.1) lib/action_dispatch/middleware/cookies.rb:331:in `call' 
activerecord (3.1.1) lib/active_record/query_cache.rb:62:in `call' 
activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call' 
actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' 
activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks' 
activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks' 
actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call' 
rails-dev-tweaks (0.5.2) lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:in `call' 
rack (1.3.5) lib/rack/sendfile.rb:101:in `call' 
actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call' 
actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call' 
railties (3.1.1) lib/rails/rack/logger.rb:13:in `call' 
rack (1.3.5) lib/rack/methodoverride.rb:24:in `call' 
rack (1.3.5) lib/rack/runtime.rb:17:in `call' 
activesupport (3.1.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
rack (1.3.5) lib/rack/lock.rb:15:in `call' 
actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call' 
airbrake (3.0.9) lib/airbrake/user_informer.rb:12:in `call' 
railties (3.1.1) lib/rails/engine.rb:456:in `call' 
railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call' 
railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call' 
rack (1.3.5) lib/rack/handler/webrick.rb:59:in `service' 
/Users/nicks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' 
/Users/nicks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' 
/Users/nicks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' 
+0

我沒有明確調用編組庫中的任何東西。但它看起來像active_support使用Marshal模塊。根據完整的跟蹤(我剛剛添加到該帖子),這就是錯誤發生的地方。 –

回答

2

清除Cookie:您的應用程序存儲會話(這是一個編組紅寶石對象)在cookie中。如果我沒有記錯,他調集1.8和1.9之間改變了形式,使您的應用程序,可以不再裝載舊會話

+0

這個伎倆!萬分感謝。 –

1

在更新生產應用程序,我能夠通過清除所有會話來解決這個問題:

DELETE FROM sessions; 

(從使用SQL的數據庫 - 所以用戶不必清除他們的cookie)

相關問題