請問 AWD with Rails 2/e 的 Hello Rails
昨天買了 Agile Web Development with Rails,
今天就照著書上第四章所寫很期待的寫了個 Hello Rails。
不過碰到一個奇怪的問題,
我打 localhost:3000 是ok的,可見 server 有跑起來。
但我 ruby generate controller Say 之後,
也在 app/controllers/say_controller.rb 中定義了 hello
app/views/say/ 底下也已照書中寫好了 hello.rhtml,
localhost:3000/say/hello 卻是 Not found
請問可能是哪裡出錯了呢?
我的作業系統是 Ubuntu 6.06
server 是用 webrick
(ruby server webrick 所跑起來)
先謝謝各位的解惑,我自己搞有點久了… @"@
---
以下是開 webrick 那個 terminal 所輸出的錯誤訊息…
#<NameError: uninitialized constant Breakpoint>
["../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:123:in
`const_missing'",
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:131:in
`const_missing'",
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:133:in
`const_missing'", "../config/../vendor/rails/railties/lib/dispatcher.rb:75:in
`reset_after_dispatch'",
"../config/../vendor/rails/railties/lib/dispatcher.rb:46:in `dispatch'",
"../config/../vendor/rails/railties/lib/webrick_server.rb:115:in
`handle_dispatch'",
"../config/../vendor/rails/railties/lib/webrick_server.rb:81:in `service'",
"/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'",
"/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'",
"/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'",
"../config/../vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch'",
"../config/../vendor/rails/railties/lib/commands/servers/webrick.rb:59",
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
`require'", "../config/../vendor/rails/railties/lib/commands/server.rb:30",
"server:3"]
[2007-05-29 15:27:08] ERROR `/say/hello' not found.
127.0.0.1 - - [29/May/2007:15:27:08 CST] "GET /say/hello HTTP/1.1" 404 279
- -> /say/hello
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.4.234
推
05/29 16:14, , 1F
05/29 16:14, 1F
推
05/29 19:38, , 2F
05/29 19:38, 2F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 6 篇):
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章