每次我尝试在本地服务器上加载任何页面时,都会收到以下错误:
[2460faa3017297069fc8b26865c3f95c] [127.0.0.1]
[2460faa3017297069fc8b26865c3f95c] [127.0.0.1]
[2460faa3017297069fc8b26865c3f95c] [127.0.0.1] Started GET "/test/social" for 127.0.0.1 at 2014-09-11 19:21:56 -0400
[2460faa3017297069fc8b26865c3f95c] [127.0.0.1] Processing by TestController#social as HTML
[2460faa3017297069fc8b26865c3f95c] [127.0.0.1] Completed 500 Internal Server Error in 1ms
[2460faa3017297069fc8b26865c3f95c] [127.0.0.1]
NoMethodError (undefined method `empty?' for nil:NilClass):
app/controllers/test_controller.rb:4:in `social'
class TestController < ApplicationController
def social
render :layout => false (line 4)
end
end
<!DOCTYPE HTML>
<head>
<title>Title</title>
</head>
<body>
HI
</body>
</html>
无论布局如何,每个操作都会显示此错误。我尝试删除所有CSS,JS和无关的HTML,但错误仍然存在。这里发生了什么?