Working my way through the Simply Rails 2 book and I am stuck on page 226 with RJS templates.

I'm trying to update the voting score thats displayed on the page and highlight it with a visual effect using a RJS template.

Everything works fine until I rename my create.html.erb file to create.rjs and modify it with the following code:

Code Ruby:
page.replace_html 'vote_score', "Score: #{@story.votes.size}"
page[:vote_score].visual_effect :highlight

After trying to submit a vote the browser displays this error:

try {
Element.update("vote_score", "Score: 21");
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.update(\"vote_score\", \"Score: 21\");\n$(\"vote_score\").visualEffect(\"highlight\");'); throw e }

Can anyone help me out with this? I would really appreciate it!