I usually point to this comment in GitHub Issues, which I posted the first time I came across this problem. But GitHub Issue comments are difficult to link to, and almost useless in search results due to all their ajaxy-ness. So, I'll repost and explain here for future reference.
Great, so now what?
First, let's make sure that this is indeed what's happening. To verify that the response is getting interpreted as JS and not plain text, go to the Rails log and make sure the remote request looks like this:
Here is my process for debugging this type of solution. Firebug works best, because it contains all the tools needed in one place.