我從遷移Rails的2至3 Rails的一個大工地當我試圖得到一個資產,我得到使用下面的錯誤Webrick
:Rails的錯誤服務資產
Started GET "/assets/key.png" for 127.0.0.1 at 2013-03-20 11:00:06 -0300
Served asset /key.png - 200 OK (15ms)
[2013-03-20 11:00:08] ERROR NoMethodError: undefined method `each' for nil:NilClass
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.5/lib/rack/handler/webrick.rb:71:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
我已經檢查機架源代碼和問題是在以下行的文件webrick.rb的(身體無):
body.each { |part|
res.body << part
}
使用Thin
我收到了類似的錯誤:
Started GET "/assets/key.png" for 127.0.0.1 at 2013-03-20 11:34:31 -0300
Served asset /key.png - 200 OK (33ms)
!! Rack application returned nil body. Probably you wanted it to be an empty string?
!! Unexpected error while processing request: undefined method `each' for nil:NilClass
並在瀏覽器:
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
我一直在努力與此錯誤。任何幫助?
也許你應該嘗試更新機架到更新的版本? – 2013-03-20 14:12:17
我該怎麼辦?我也試過乘客,它沒有工作。但讓我知道如何更新機架。 – Tony 2013-03-20 14:19:57
我會說'寶石更新架':) – 2013-03-20 14:25:04