We're using the Postgis adapter with Ruby on Rails, and we're trying to use Puma on Heroku for our production environment. Our test pass flawlessly on the development system. Also, the server works perfectly on every production server but Heroku, but once we run it on Heroku + Puma (or Unicron), we get an exception.
As a side note, the application works smoothly when deployed using Webrick on Heroku.
When using puma (and at a later try, unicorn) as the default web server, everything goes well but one thing:
I'm using RGeo gem to keep track of some hive locations. When switched to Puma (Unicorn), calling @hive.current_location.lon
and @hive.current_location.lat
in my Javascript views throws the error:
ActionView::Template::Error (undefined method 'lon' and 'lat' for #<RGeo::Cartesian::PointImpl:0x007f700846c970>)
Meanwhile, I tried to access the current_location latitude and longitude through heroku run rails console
The interesting thing is that fetching lat and long values on Heroku console returns correct values. It seems that the problem results from puma and unicorn.
Any suggestion?