今天買了一本O'reilly的山羊書Ruby on Rails : 建置與執行。
可是書本打開照著作第一個例子就出很大的問題了
我NB的OS是Windows vista SP1
下面是我的操作過程
首先建立一個新專案
rails chapter-1
ruby script/server
這邊都沒有問題,打開localhost:3000也看得到歡迎頁
接下來就是問題的開始了
ruby script/generate controller Greeting index
exists app/controllers/
exists app/helpers/
create app/views/greeting
exists test/functional/
create app/controllers/greeting_controller.rb
create test/functional/greeting_controller_test.rb
create app/helpers/greeting_helper.rb
create app/views/greeting/index.html.erb
^^^^^^^^^^
按照書上的範例這邊應該要生成index.rhtml才對
可是我的結果卻跟書上的不一樣
連上
http://localhost:3000/greeting出現的也是這種錯誤訊息
MissingSourceFile in GreetingController#index
並不是像書上一樣會連結到一個空白網頁告訴你檔案的位置
我只是個網業開發新手,才剛開始就遇到這種問題我根本不知道怎麼解決阿 Orz