Ruby on Rails - Ajax not working on production, but is on dev

So I decided that I had to write on this, because it was sooooo annoying.

I’m currently writing a rails website (  I’ve been adding Ajax to it to make it cool.  Everyone loves ajax right?  The problem is that Ajax problems are harder to diagnose.  Nothing happens, and nothing tells you why.

The problem is that on my development box everything worked perfectly, but on my production box the ajax stuff just didn’t work.  No error, or anything, it just didn’t update the div properly.  Ends up that I forgot to delete the rhtml file :(. I had a create.rjs file that updated the div, and a create.rhtml file still sitting there on the production server but not on the dev box.  Very annoying.

So, if ajax just isn’t working, and you’re not getting any errors, make sure that you don’t have an rhtml file with the same action name.


There are no comments yet...Kick things off by filling out the form below.

Leave a Comment