1

I've fixed all the errors about "xxx" is not compiled and all the assets show up -- when running locally everything works fine:

  • All ajax requests work
  • Form submissions use the rails remote tag and fire off properly

However when running in production mode locally (and on Heroku):

  • Some ajax will work -- however things like PUT's that should be updatating records (and do in dev) don't... They will hit the page but not do the actual database update
  • Remote forms are completely broken and resulting in regular form submission

The source can be cloned from here: https://github.com/bluescripts/reru_scrum

Maybe I'm miscompiling the assets wrong or maybe I'm missing an appropriate include in my application.js file?

I've been compiling via:

rake assets:precompile
Josh
  • 945
  • 9
  • 19

1 Answers1

3

You're missing //= require jquery_ujs in your application.js. This file comes with jquery-rails gem and is responsible besides other things for handling remote links and forms.

Btw, I'd suggest removing .Gemfile.swp from your repo and adding .*.swp to .gitignore.

KL-7
  • 46,000
  • 9
  • 87
  • 74
  • So this fixes it in production for everything EXCEPT choosing a story as open/closed. However in development mode, this causes everything to double post; any ideas? – Josh Nov 20 '11 at 15:51
  • Precompiled assets are not supposed to be used in development mode. See answer to [this](http://stackoverflow.com/questions/8013478/how-to-avoid-precompiled-assets-being-served-in-development-mode) question. You just need to remove all precompiled assets from your local public directory and setup precompilation in deploy script so precompiled assets will exist only on the server in production environment. – KL-7 Nov 20 '11 at 16:27
  • That did it! Clearing out all the old assets then compiling locally and pushing got it all working again. – Josh Nov 20 '11 at 16:51