0

when i am running the code on rails console as: Point.from_x_y(88.365805,22.543538)

Then getting error as:

NameError: uninitialized constant Point

Can anyone help me to remove this error?

I am running require 'gems' before running this code as:

require 'geo_ruby'
require 'geo_ruby/ewk'
Felix
  • 4,510
  • 2
  • 31
  • 46
Rajesh Kumar
  • 167
  • 1
  • 3
  • 14

1 Answers1

3

It's namespaced, so if you're using it rails instead of pure ruby, you need to call the full namespace of the class. Your query will work if you call instead:

GeoRuby::SimpleFeatures::Point.from_x_y(88.365805,22.543538)
trh
  • 7,186
  • 2
  • 29
  • 41