突然之间,即使在更换我的应用程序后,我也会收到如下错误:
!! Unexpected error while processing request: undefined method `show' for "/":String
我已经用几个小时前的备份替换了我的代码,当我通过打开浏览器并单击真实页面来构建新功能时,我不断测试我的应用程序,备份中的旧代码完美运行,但现在我无法让我的应用程序运行不再工作
帮助!任何更高级的 ruby on rails 编码器可以帮助我解决这个问题?谢谢
rails/server 的完整输出而不是日志!
/Users/jordan/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/jordan/apps/books/script/rails server -b 0.0.0.0 -p 3000 -e development
=> Booting Thin
=> 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
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
!! Unexpected error while processing request: undefined method `show' for "/":String
!! Unexpected error while processing request: undefined method `show' for "/":String
!! Unexpected error while processing request: undefined method `show' for "/":String
!! Unexpected error while processing request: undefined method `show' for "/":String
!! Unexpected error while processing request: undefined method `show' for "/profiles":String
!! Unexpected error while processing request: undefined method `show' for "/about":String
尝试过的事情
- 清理路由文件
- 重启机器
- 从宝石集中移除所有宝石并干净安装
- 在 Rails 应用程序上测试了另一个 ruby,效果很好