I'm having a problem with my Archives built on Ruby on Rails when I deploy to Heroku. Everything is working fine on my Local servers however when I run the app on Heroku there are problems when i load the page.
The Heroku logs showed this
PG::UndefinedFunction: ERROR: function strftime(unknown, timestamp without time zone) does not exist
strftime? It doesn't seem to be widely supported in Postgres, but it may be a very recent addition; and it might be an idea to see if you can refactor it on your end instead.@bets_by_month = @bets_by_year.where("strftime('%m', created_at) = ?", params[:month]).where("EXTRACT(MONTH FROM created_at) = ?", params[:month]).EXTRACTgoes back at least as far as 9.0. See the Postgres docs. Ordate_partis equivalent.