Then I changed the data type of lat_rad and lng_rad to float. Even then it
is giving me the same error. Any help to solve this problem will be
appreciated. Thanks in advance.
I would suggest first splitting the statement into several lines
performing a single operation on each line, this will enable you to
identify which part of the statement is generating the error. Also
try playing in ruby console to try and see what is going on. Finally
you could use ruby-debug to break in to the code and examine the types
of the variables to find what may not be quite as you expect.
Also you did not answer the question as to whether this is in a
migration. If so then it fraught with problems, it is not advisable
to seed data within a migration if that is what you are doing.
Colin, this is in a migration.
But I did not understand the last para of your reply. As you have suggested,
I will first try it on script/console and den let me try to know where
exactly the error is happening.
Could you not top post please? If you had put the above query under
the offending paragraph we would not have had to scroll down to find
to what you were referring. Thanks.
Thanks once again. I'm sorry for giving you the trouble to scroll down to
see the query that I was referring to. I am quite new to nabble.
henceforth, I'll make it a point to top post such things