Heroku taps push weirdness...
Posted
by holden
on Stack Overflow
See other posts from Stack Overflow
or by holden
Published on 2010-04-23T14:42:43Z
Indexed on
2010/04/23
14:53 UTC
Read the original article
Hit count: 460
I have the strangest experience using taps to move data between my machine and heroku.
It works fine except that it seems to loose 0s directly behind the decimal place for my geo coordinates. Ie 50.0519322 for some reason gets set to 50.519322... no idea why.
When I pull the data from the remote location ie. heroku db:pull... it works fine, all decimal places intact on my machine, however, when i push it back to the remote server it loses these zeros. Especially directly behind the decimal place, though I haven't noticed it elsewhere yet.
At first I was storing the lat and lng as simply numeric but refined it to:
change_column :places, :lat, :numeric, :precision => 15, :scale => 10
change_column :places, :lng, :numeric, :precision => 15, :scale => 10
With no result, any ideas what's going on?
From the console on the remote server i get the lat as being:
#<BigDecimal:2aebcc5967c0,'0.50519322E2',18(18)>
and my machine as:
#<BigDecimal:10232f7c8,'0.50519322E2',12(16)>
which is also odd, the second one because it shows up as 50.0519322 when i edit it thru my view but when i do to_f via console it gives me 50.519322
© Stack Overflow or respective owner