# Error when upgrading application to Rails2

**URL:** <https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541>\
**Category:** Rails\
**Created:** [February 19, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541 "2008-02-19T13:32:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [February 19, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541/1 "2008-02-19T13:32:18Z")

</div>

I have just tried to run my app under Rails 2 but I have hit a strange  
error message and wonder if anyone here can give me any pointers. The  
error is:

ActionView::TemplateError (undefined method `new’ for “rhtml”:String) in  
portal/index.rhtml

You can see the full error log here: [Parked at Loopia](http://pastie.caboo.se/154221)

This is on Instant Rails 2. My app works fine on Instant Rails 1.7 and  
in my Netbeans environment, buth using Rails 1.2. I wanted to get my  
code adjusted for Rails 2 before updating my Netbeans environment.

Thanks…

---

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [February 19, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541/2 "2008-02-19T18:43:53Z")

</div>

On 2/19/08, John L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have just tried to run my app under Rails 2 but I have hit a strange  
> error message and wonder if anyone here can give me any pointers. The  
> error is:
> 
> ActionView::TemplateError (undefined method `new’ for “rhtml”:String) in  
> portal/index.rhtml

perhaps because in Rails 2.0 a view file x.rhtml needs to be renamed  
to x.html.erb ?

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [February 19, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541/3 "2008-02-19T20:52:26Z")

</div>

@John – Can you show us the controller method?

@Rick – No, 2.0 is backward compatible with the .rhtml files. I’ve  
got many rendering with no problem.

---

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [February 20, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541/4 "2008-02-20T14:10:21Z")

</div>

Hi, there is no code in the portal controller:

class PortalController \< ApplicationController

end

I will download the latest versions of the plugins that I am using. I  
currently have  
active\_scaffold (latest version downloaded today)  
acts\_as\_fulltextable  
attachment\_fu  
headliner  
settings  
styler  
markaby  
will\_paginate

The problem was with Markaby. This plugin seemed a great idea but looks  
like it isn’t actively maintained any more. I found a patch to the code  
here:

[http://dev.rubyonrails.org/attachment/ticket/10543/markaby\_fix.diff](http://dev.rubyonrails.org/attachment/ticket/10543/markaby_fix.diff)

This fixed it for me. Thanks guys for your responses 🙂
