TypeError in highlight (ActionView::Helpers::TextHelper)

I was trying to highlight more than 1 term in a text with highlight
method from TextHelper. Much to my surprise, I just copied the example
from Rdoc (http://api.rubyonrails.org/classes/ActionView/Helpers/
TextHelper.html#M001050): highlight(‘You searched for: rails’,
[‘for’, ‘rails’], ‘\1’)

But I get TypeError.

C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_view/
helpers/text_helper.rb:48:in escape' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_view/ helpers/text_helper.rb:48:in highlight’

Then I updated to Rails 2.0.2 (gem update rails -y ). But still
doesn’t work. On the two lines above, the path
is …actionpack-1.13.6 … what do I need to do to work with
actionpack 2.0.2?

I’m working with netbeans for win XP

Thanks in advance,

Paulo P.

On 16 Feb 2008, at 19:20, Paulo P. wrote:

helpers/text_helper.rb:48:in escape' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_view/ helpers/text_helper.rb:48:inhighlight’

Then I updated to Rails 2.0.2 (gem update rails -y ). But still
doesn’t work. On the two lines above, the path
is …actionpack-1.13.6 … what do I need to do to work with
actionpack 2.0.2?

You’re environment.rb probably says something like
RAILS_GEM_VERSION = ‘1.2.5’ unless defined? RAILS_GEM_VERSION

Change that to the version of rails you want to use. Don’t forget to
run rake rails:update

Fred