3

I've just made my Rails app and deployed it to Heroku. A very weird thing happened in the process though. Half of my javascript-files are missing their endings (.js). I have absolutely no idea why this is.I've searched far and wide, but I don't seem to find an answer.

My production-config looks like this:

  # Code is not reloaded between requests
  config.cache_classes = true

  # Full error reports are disabled and caching is turned on
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true

  # Disable Rails's static asset server (Apache or nginx will already do this)
  config.serve_static_assets = true

  # Compress JavaScripts and CSS
  config.assets.compress = true

  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true

  # Generate digests for assets URLs
  config.assets.digest = true

  config.assets.precompile << '*.js'

Any suggestions?

Posted this other similar question 1 hour ago (http://stackoverflow.com/questions/9049023/rails-3-1-production-javascript-loads-but-doesnt-execute). Sorry for the spamming.

Mitch Dempsey
  • 38,725
  • 6
  • 68
  • 74
Holger Sindbaek
  • 2,278
  • 6
  • 41
  • 68

1 Answers1

1

Does this help? You didn't show where your js files are included. If they have dots in the name, apparently you need to tell Rails. asset:precompile for .js files? rails 3.1

Community
  • 1
  • 1
Ed Jones
  • 653
  • 1
  • 4
  • 19
  • I'm sorry, but I asked this question over a month ago. I can't even remember how I made it work. Thank you very much for answering the question though. – Holger Sindbaek Mar 17 '12 at 14:33