我是Ruby on Rails的新手,正在做我的第一个教程,并且正在运行最新版本的rails 3和ruby 1.9.2。在创建我的控制器并导航到http://localhost:3000/say/hello后,我收到一个空白页。当我转到http://localhost:3000时,我看到欢迎使用Rails消息。我做了一些谷歌搜索,人们也遇到类似的问题,但没有明确的解决方法。我从来没有真正与MVC合作过,因此路由的概念对我而言是相当新颖的。导航到http:// localhost:3000/say/hello的空白页面
下面是我的控制器:
class SayController < ApplicationController
def hello
end
def goodbye
end
end
我的观点:
<h1>Say hello to Rails!</h1>
你有没有设置路由到say控制器? – Ingo 2011-03-23 19:00:15