The following task describes how to create a controller and a default view for your application. The controller handles requests, dispatches them to other parts of the application as necessary, and determines which view to render. The view is the file that generates the output to the browser. In Rails, views are typically written with ErB, a templating mechanism.
Change to the directory where you created the hello application in the previous task. For example:
/apps/jruby-apps/hello
Create a controller and default view for your application:
jruby script/generate controller home index
You should see a controller file called home_controller.rb in the hello/app/controllers directory and a view file called index.html.erb in the hello/app/views directory.