Can't view FILENAME.rhtml but can view FILENAME.html

I receive the following error message:

Missing template app/index, application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "/home/paul/Projects/Ruby on Rails/mark_hughes_seo_project/app/views"

It looks like it's expecting the html format. How to I instruct it look for an .rhtml file? I've looked all over and can't seem to find an answer!

Thx, Paul

ps. If I rename the file to .html, it works. However, I'm trying to figure out why .rhtml doesn't.

Answers


use .html.erb. are you accessing an action on a route mapped to the application controller? if so, that's probably not the best idea.

basically, the files go in the "app/views/#{controller_name}/#{action_name}.html.erb" if that makes any sense.

of course, .html.haml if using haml.


Need Your Help

Print out a new line in java

java

I have this code that sends a document to a printer for printing. Currently everything is working ok and the code for that is shown below.