kristianmandrup / geo-distance

Calculates the geo distance between two locations using longitude and latitude, using Haversine, Speherical or Vincenty formula
MIT License
52 stars 19 forks source link

Too old version of sugar-high results in Stack level too deep error #2

Closed Martin288 closed 8 years ago

Martin288 commented 8 years ago

Hi @kristianmandrup , I used this gem about 2 weeks ago, the below lists my application informations:

The problem is that I randomly got SystemStackError: stack level too deep error, I spent much time to debug it and I could not find out any problem source until I tried to customize the log for errors, and I luckily got one line:

I, [2016-01-10T09:13:28.528437 #29987]  INFO -- : stack level too deep
["/data/apps/djiplus/shared/bundle/ruby/2.0.0/gems/sugar-high-0.4.6.4/lib/sugar-high/string.rb:8"]

I also try to search related issues and got this report: https://github.com/kristianmandrup/sugar-high/issues/17 .

I have the below line in my Gemfile:

gem 'geo-distance', '~> 0.2.0'

and bundler installed the related gems for me:

geo-distance (0.2.0)
      geo_point (~> 0.2.5)
      geo_units (~> 0.2.4.1)
    geo_calc (0.7.6)
      activesupport (>= 3.0.1)
      geo_units (~> 0.2.1)
      i18n
      require_all (~> 1.2.0)
      sugar-high (~> 0.4.6.3)
    geo_point (0.2.5)
      geo_calc (~> 0.7.5)
      geo_units (~> 0.2.1)
    geo_units (0.2.4.1)
      sugar-high (~> 0.4.6.2)
    sugar-high (0.4.6.4)

See? the installed version of sugar-high is 0.4.6.4, which is the version mentioned in issue report https://github.com/kristianmandrup/sugar-high/issues/17 .

I guess the reason why I got the error is same to one in the above report. Maybe you should update to the latest versions of your denpendices, that is, geo_calc and geo_units, etc... ?

kristianmandrup commented 8 years ago

Yeah, I think so. I'm sorry. I haven't really been using Ruby or geo coding the past 2-3 years.

kristianmandrup commented 8 years ago

Try forking it, then change sugar-high dependency to ~0.7.3.

kristianmandrup commented 8 years ago

I updated the dependencies og -units, -distance and -calc geo gems. Try now ;)

Martin288 commented 8 years ago

@kristianmandrup Thanks so much, this issue has been solved.