我看了下错误 有homework拿不到的nil错误NoMethodError (undefined method `+' for nil:NilClass) 有文件未找到Errno::ENOENT (No such file or directory - .... 重写一个页面,仿照file_not_found.html,然后把报错的原因显示出来。不要直接贴错误栈 文件找不到写明 “xxx文件不存在或已被损坏”
状态 从 已解决 变更为 正在解决
Started GET "/zipdown/download_user_homework?homework=793" for xxx at 2014-07-22 11:59:22 +0800 Processing by ZipdownController#download_user_homework as HTML Parameters: {"homework"=>"793"} HTTP_USER_AGENT Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 Completed 500 Internal Server Error in 18ms NoMethodError (undefined method `+' for nil:NilClass): app/controllers/zipdown_controller.rb:44:in `download_user_homework' 把异常也截下来,返回别的页面,别总500了 (不行就跳public/file_not_found.html