我创建了一个新的 Rails 应用程序(3.2.3,ruby 1.9)并尝试启动服务器。服务器正常启动,但随后我转到http://localhost:3000我有错误:
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-05-09 22:20:03] INFO WEBrick 1.3.1
[2012-05-09 22:20:03] INFO ruby 1.9.3 (2012-02-16) [i686-linux]
[2012-05-09 22:20:03] INFO WEBrick::HTTPServer#start: pid=3998 port=3000
[2012-05-09 22:20:05] ERROR NameError: undefined method `render_to_body' for module `AbstractController::Rendering'
这是什么?
最佳答案
我在使用 HAML 3.1.5 版时遇到了这个问题。恢复到 3.1.4 修复了它。如果不是 HAML,完整的堆栈跟踪将有助于诊断您的问题。
关于ruby-on-rails - 模块 AbstractController::Rendering 的未定义方法 render_to_body,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10522845/