Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4070612
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:39:00+00:00 2026-05-20T16:39:00+00:00

Recently I deployed my application on Heroku. I’m using Geokit to search events, based

  • 0

Recently I deployed my application on Heroku. I’m using Geokit to search events, based on user’s location.

@events = Event.all(:origin => [@location.lat, @location.lng], :within => 5, :conditions => [“end_date >= ?”, Date.today], :select => “id, created_at, user_id, location, description, permalink, title”, :order => “created_at DESC”)

The above statement is working fine in my local system with mysql database.

But I’m getting error while executing same stmt on Heroku. Please check the below error I’m facing on Heroku.

ActiveRecord::StatementInvalid (PGError: ERROR: function radians(character varying) does not exist
2011-03-20T00:52:23-07:00 app[web.1]: LINE 2: …,COS(0.303256183987648)*COS(1.36963671754269)*COS(RADIANS(fr…
2011-03-20T00:52:23-07:00 app[web.1]: ^
2011-03-20T00:52:23-07:00 app[web.1]: HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Any help would be greatly appreciated.

Thanks,
Kalyan.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:39:00+00:00Added an answer on May 20, 2026 at 4:39 pm

    As a heads-up, Heroku uses Postgres as the only SQL database backend: http://devcenter.heroku.com/articles/database

    Therefore, your problem is related to these two Q&A:

    Why does Postgresql fail with Geokit like this?

    Rails: Converting from MySQL to PostGres breaks Geokit Distance Calculations?

    In your case, you should add a database migration and change “lat” and “lng” in your location model from “string” (or “text”) to “float”, and then Geokit should work fine with Postgres and Heroku respectively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a web based application in production built using django. It is deployed
I've recently deployed some A/B testing experiments using vanity to my heroku instance. However,
I have MVC3 & SqlServer 2008 based application recently deployed. The application works fine
I've recently deployed to http://domainshop.apphb.com/ a simple ASP.NET application using the following NuGet packages:
My deployed application uses ReportViewer (CLR 3.5) to print locally reports. Recently users noticed
Recently, we deployed our web-application to a new set of servers. AppServer: Websphere 6.1
I recently bought some webspace with dailyrazor.com. I have deployed an application I have
I've recently deployed my first Rails application on a Mac mini running Lion 10.7.2
I recently deployed a Spring MVC application to google app engine, and the intial
I have a silverlight based application consisting of charts using silverlight toolkit and connected

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.