>rails demo
>cd demo
>ruby script/server
further more,create a controller
demo> ruby script/generate controller Say
You’ll find it in the file app/controllers/say_controller.rb
class SayController < ApplicationController
end
then,create an action and name it hello
class SayController < ApplicationController
def hello
end
end
we also need to create a file called
app/views/say/hello.rhtml
<html>
<head>
<title>Hello, Rails!</title>
</head>
<body>
<h1>Hello from Rails!</h1>
</body>
</html>
now you can visit your site: