The next step in creating and deploying the hello application is to create an application controller and a default application view.
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 in which you created the hello application in To Create the hello Application.
In this example:
cd /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.
Proceed with the instructions in To Pass Data From the Controller to the View.