# Index.erb vs rhtml

**URL:** <https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710>\
**Category:** Rails\
**Created:** [May 24, 2009, 8:00pm UTC](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710 "2009-05-24T20:00:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rails\_n00b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@rails\_n00b](https://www.ruby-forum.com/u/rails_n00b)\
**Post date:** [May 24, 2009, 8:00pm UTC](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710/1 "2009-05-24T20:00:04Z")

</div>

I am a total Ruby/RoR n00b having just started reading the ‘Ruby on  
Rails Bible’ book two days ago. I’ve been trying to work out through  
the introductory ‘Your first ruby on rails application’ section, but  
I’ve run into problems already!

The book goes on about creating the view templates and naming them  
with the \*.html.erb extension, but I get run-time errors when I use  
that extension. I have seen some other RoR sites that use the \*.rhtml  
extension so I tried that instead and that seemed to fix my problem.

But isn’t that the old rails file naming convention? I want to use the  
proper/new convention but I’m not sure what I need to do … perhaps  
update Ruby or Rails or ??? on my computer? Or is it something I have  
misconfigured?

I’m developing on a Mac and these are the versions of Ruby and RoR I  
currently have installed:

ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]  
Rails 2.3.2

If this helps, when I run “gem list” I get this output:

\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.3.2, 1.3.6)  
actionpack (2.3.2, 1.13.6)  
actionwebservice (1.2.6)  
activerecord (2.3.2, 1.15.6)  
activeresource (2.3.2)  
activesupport (2.3.2, 1.4.4)  
acts\_as\_ferret (0.4.1)  
capistrano (2.0.0)  
cgi\_multipart\_eof\_fix (2.5.0, 2.2)  
daemons (1.0.9, 1.0.7)  
dnssd (0.6.0)  
fastthread (1.0.1, 1.0)  
fcgi (0.8.7)  
ferret (0.11.4)  
gem\_plugin (0.2.3, 0.2.2)  
highline (1.2.9)  
hpricot (0.6)  
libxml-ruby (0.9.5, 0.3.8.4)  
mongrel (1.1.4, 1.0.1)  
needle (1.3.0)  
net-sftp (1.1.0)  
net-ssh (1.1.2)  
rails (2.3.2, 1.2.6)  
rake (0.8.7, 0.7.3)  
RedCloth (3.0.4)  
ruby-openid (1.1.4)  
ruby-yadis (0.3.4)  
rubynode (0.1.3)  
sqlite3-ruby (1.2.1)  
termios (0.9.4)

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![rails\_n00b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@rails\_n00b](https://www.ruby-forum.com/u/rails_n00b)\
**Post date:** [May 24, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710/2 "2009-05-24T21:10:29Z")

</div>

Can you post the errors you are getting?

On 5/25/09, rails\_n00b [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> extension so I tried that instead and that seemed to fix my problem.  
> Rails 2.3.2  
> activesupport (2.3.2, 1.4.4)  
> hpricot (0.6)  
> rubynode (0.1.3)  
> sqlite3-ruby (1.2.1)  
> termios (0.9.4)
> 
> Any help would be greatly appreciated!
> 
> >

–

* * *

Steve Shepherd  
Mob:+64 (0) 27 4338154  
Email: removed\_email\_address@domain.invalid  
Analyst

---

<div class="post-metadata">

**Author:** ![rails\_n00b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@rails\_n00b](https://www.ruby-forum.com/u/rails_n00b)\
**Post date:** [May 24, 2009, 9:51pm UTC](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710/3 "2009-05-24T21:51:33Z")

</div>

Here is an example of the type of error I am getting when my view  
templates are \*.html.erb files:

Showing app/views/contact/show.rhtml where line # raised:  
No such file or directory - /Users/kevin/dev/Ruby/sandbox/  
contactlist/app/views/contact/show.rhtml

Its like its expecting my views to be .rhtml files, not .html.erb  
files

---

<div class="post-metadata">

**Author:** ![rails\_n00b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@rails\_n00b](https://www.ruby-forum.com/u/rails_n00b)\
**Post date:** [May 24, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710/4 "2009-05-24T22:13:38Z")

</div>

> Its like its expecting my views to be .rhtml files, not .html.erb  
> files

Cleanup your rubygems, you have a very old version installed, and maybe  
in your Rails. Define in environment.rb:

RAILS\_GEM\_VERSION = ‘2.3.2’ unless defined? RAILS\_GEM\_VERSION
