Rjs Type error when added jrails plugin into current RoR project

I am really new in both RoR and AS. I wanted to replace jquey in my project as well as active scaffolding. But AS seems like closely incorporated with prototype. Therefore, I am trying to work with both jquery and prototype. I configured them and they are working togather. But after that my active scaffold is showing a RJS type error. The name of my active scaffold is user. And the error message is "RJS Type Error: #users-messages has no property". I am trying to solve the problem. Mozzila debugger shows that the errors are in line 1222 and 396 of prototype.js

AS shows its outputs as needed but I am failing to get rid of the pop- up error messages.

Does anyone has any idea abou how to solve his problem??

Please help me.

Thanks a lot.