ruby-on-rails – rails app奇怪的错误,没有跟踪,没有日志输出帮
发布时间:2020-12-17 03:38:27 所属栏目:百科 来源:网络整理
导读:所有突然之间,甚至在更换我的应用程序后,我得到一个错误,如: !! Unexpected error while processing request: undefined method `show' for "/":String 我已经用几个小时之前的备份替换了我的代码,当我通过打开浏览器并单击真实页面来构建新功能时,我不断测
所有突然之间,甚至在更换我的应用程序后,我得到一个错误,如:
!! Unexpected error while processing request: undefined method `show' for "/":String 我已经用几个小时之前的备份替换了我的代码,当我通过打开浏览器并单击真实页面来构建新功能时,我不断测试我的应用程序,备份中的旧代码完美无瑕但现在我无法将我的应用程序运行到工作了 救命! 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时破坏了.如果您遇到这种奇怪的行为,请务必在应用代码之前检查/ config /和初始值设定项; p (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |