Error when upgrading application to Rails2

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

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…

On 2/19/08, John L. [email protected] 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/

@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.

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

This fixed it for me. Thanks guys for your responses :slight_smile: