Closed wfwalker closed 12 years ago
In Production
Started GET "/locations.json" for 127.0.0.1 at 2012-10-29 14:52:05 -0700 Processing by LocationsController#index as JSON VC: Not logged in, no timeout check Read fragment views/localhost:3000/locations.json (0.3ms) Rendered text template within layouts/responsive (0.0ms) Completed 200 OK in 46ms (ActiveRecord: 0.0ms)
In Development
Started GET "/locations.json" for 127.0.0.1 at 2012-10-29 14:53:22 -0700 Connecting to database specified by database.yml Processing by LocationsController#index as JSON VC: Not logged in, no timeout check Location Load (12.4ms) SELECT DISTINCT locations.* from locations, counties, states where locations.county_id=counties.id AND counties.state_id = states.id ORDER BY states.name, locations.name Location Load (4.6ms) select locations.*, count(distinct trips.id) as trip_count from locations,sightings,trips where locations.id=sightings.location_id and sightings.trip_id=trips.id and datediff(now(), trips.date) < 40 group by locations.id order by trip_count desc limit 5 Completed 200 OK in 146ms (Views: 81.2ms | ActiveRecord: 18.4ms)
the symptom can be fixed by changing config.action_controller.perform_caching from true to false in config/environments/production.rb, but then we get no benefit from the caching, so that feels wrong.
could be related to this: http://railsforum.com/viewtopic.php?id=25383
fixed in 0982e3970c4444dfae2aea6771836ee086cacb3f deployed.
thanks to @nickdesaulniers, see also http://garrickvanburen.com/archive/rails-page-caching-with-multiple-formats-in-respond_to/
/locations.json behaves differently in development environment versus production environment
This means the google map on the locations page doesn't work!!