Re: [問題] 關於route.rb沒有作用
※ 引述《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://www.ptt.cc/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
推
07/29 19:05, , 1F
07/29 19:05, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 3 篇):
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章