After upgrading a Rails 3.0 app to 3.1 on Heroku running on the cedar stack, everything seemed fine except for one major issue - the app's JavaScript wouldn't run. Despite the application.js file being compiled and accessible at myapp.com/assets/application.js, it simply refused to execute.
Surprisingly, when testing the app locally, the JavaScript worked perfectly fine. This led me to believe there must be a simple configuration error that I am overlooking. Below is a snippet of my production.rb file:
FloridaBirdTrail::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# 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
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end
Edit:
By replacing the contents of production.rb with those of development.rb, some of the JavaScript started working (though gmap3 seems to be having issues). Now, the question arises - which specific setting is causing this behavior?