Live server and test server sharing exact same codebase, but live server works and test server fails-Collection of common programming errors

Since I posted this question, this issue has resolved itself. There must have been a glitch on Facebook or my dev server. Anyway, thanks to those of you who tried to help.

I have a Facebook app that runs on two servers: a live server and a dev server.

I was making some changes on dev and testing them when FBJS failed with an error (undefined functions)

I continuously reverted my changes to the dev server but could not get it working. So I reverted to the same revision that works on my live server, but it still fails on the dev server.

The source of the error appears to be a single JS file. I have verified in every way possible that this is the exact same file I am using on the live server where it works, but it is failing on the dev server with “undefined functions”.

I am at my wits end with trying to debug this. I could really use some helpful suggestions. Thanks in advance for any help you can offer.

If you’re interested in reviewing the apps, you can find there here:

Live: http://apps.facebook.com/rails_across_europe

Dev: http://apps.facebook.com/rails_dev

Note that you must give the app permission to access your FB profile data.

  1. Facebook caches external JS and CSS on FBML pages. Add a cache breaker to the JS URL:

    http://example.com/js.js?version=1
    

    what I do to automatically keep in sync is, during development, I append the current timestamp as a version number. Then, when I go live, I increment the live URL by 1. I’ve automated this as well, and I suggest you do the same.

Originally posted 2013-11-09 20:01:37.