作者godfat (godfat 真常)
看板Ruby
標題Re: [問題] 關於route.rb沒有作用
時間Wed Jul 29 17:21:49 2009
※ 引述《b12031106 (B先生)》之銘言:
: godfat:你有 welcome controller 嗎?錯誤訊息是什麼?
: 有下ruby script/generate controller welcome的指令,
: 也確定有產生welcome的controller,
: 但是無論是瀏覽localhost:3000或是localhost:3000/welcome,
: 結果都是500錯誤(也就是public/500.html),
: 錯誤訊息是指log資料夾底下的訊息嗎?全部都是空白的囧
這樣完全不正常,再怎麼樣都應該要有錯誤訊息,
不管是 log 底下的檔案,或是 stdout 的輸出,
或是顯示在 browser 上的訊息。不過既然你說是顯示 public/500.html,
那 browser 上應該就沒有顯示任何錯誤。
在 development 模式下,browser 應該會顯示錯誤訊息,
而不是把 public/500.html 顯示出來。
因為你沒有任何錯誤訊息,因此發生什麼事情都有可能...
你需要一個一個測試,才能找出是誰發生問題,
或是兩樣東西混在一起之後才發生問題,這要測試才知道的,
畢竟那是你的電腦,也只有你才知道你說的 "step by step" 是什麼...
我會建議你先試試 webrick, 而不是 mongrel,
甚至 thin, passenger 都試試看,看誰會吐出錯誤訊息。
接著再看可能是誰出錯了
--
#!/usr/bin/env ruby [露比] /Programming (Kn|N)ight/ 看板《Ruby》
# if a
dog nailed
extra legs that
http://webptt.com/m.aspx?n=bbs/Ruby/index.html
#
walks like an octopus, and Welcome ~
Ruby@ptt~
#
talks like an octopus, then
◢█◣ http://www.ruby-lang.org/
# we are happy to treat it as
█ http://www.ruby-doc.org/
# if it were
an octopus.
◥ ◤ http://www.rubyforge.org/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.128.121.85
1F:推 b12031106:感謝!我試試看webrick好了 07/29 19:05