2011-05-24 129 views
3

我收到以下錯誤,當我試圖拉起一箇舊的應用程序,似乎無法指出問題。我收到'call_with_exception'錯誤,谷歌搜索沒有提供任何幫助。任何人都可以指向正確的方向嗎?我在Rails 2.3.5,Ruby 1.8.7,並使用RVM。Rails - 500內部服務器錯誤

$ script/server 
=> Booting Mongrel 
=> Rails 2.3.5 application starting on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
    SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 
/!\ FAILSAFE /!\ Tue May 24 08:31:57 -0700 2011 
    Status: 500 Internal Server Error 
    undefined method `call_with_exception' for ApplicationController:Class 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:90:in `dispatch' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/head.rb:9:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in `run' 
    /Users/my_user_dir/.rvm/gems/ruby-1.[email protected]/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in `process' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:34:in `run' 
    /Users/my_user_dir/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/commands/server.rb:111 
    /Users/my_user_dir/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' 
    /Users/my_user_dir/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' 
    script/server:3 
+4

你能張貼您的應用程序控制器代碼。如果我們不知道錯誤在哪裏,那麼很難提供幫助。升級到rails 2.3.11有幫助嗎? – Yule 2011-05-24 16:11:31

+0

看起來這是一個流氓初始化器,它是搞砸了。 – oprogfrogo 2011-05-26 21:04:23

+7

你能以一種能夠幫助他人的方式回答你自己的問題嗎?如果你這樣做,你可以選擇你的正確答案。這看起來很奇怪,但它是處理這種情況的首選方式。 – Will 2011-06-13 15:16:53

回答

0

首先,正如你可能已經知道了,一定要使用正確的紅寶石版本

rvm list #find the right ruby-1.8.7 version you have used to get this app running back then 

然後(例如,如果你使用的P249)

rvm ruby-1.8.7-p249 

如果還是不行工作,現在是一個有點冒險和調試鐵軌核心的好時機。 「放」方法在這裏有很大的幫助。

我個人將我的導軌凍結在我的應用程序中,然後直接進行修改(不推薦,大多數情況下我會寫入混合但不是所有時間)。

要凍結軌寶石:

rake gems:unpack 

然後

rake gems:install