Magento including Javascript by System path

While upgrading a Magento installation all my Javascript files had their server path, e.g. /srv/example.com/www/public/magento/js/, instead of their web accessible path, e.g. http://www.example.com/public/magento/js/.

StackOverflow saves my life again.

Update: (08:52am, 18/03/10) - As Avi Shefi notes, I didn't actually find a solution to the problem. Avi has updated the StackOverflow question with the following:

  1. Make sure the media/js directory belongs to the same user as the Magento folder
  2. Clean the CSS/Javascript cache in the administration area

You may find that you need to do some hacking around in the html to get the correct cache clearing URL as the admin area is Javascript heavy (but you could just set the dev/js/merge_files flag to 0 in the database before doing this and then reverting).