Rake test - functionals! fail

Jeff Meyer jeff at gwhat.org
Mon Oct 22 05:02:29 GMT 2012


Fixed! Function needed to be created in openstreetmap and osm. Creating it
in public won't work, esp not after those databases had been created....

(Fixed, apart from an Attribute redefined error I'll track down separately).

Correct commands (updated on the wiki...):

sudo -u postgres -i
psql -d openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8,
int4) RETURNS int4 AS
'/full(no~)/path/to/rails-port/db/functions/libpgosm', 'maptile_for_point'
LANGUAGE C STRICT;"
psql -d osm -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS
int4 AS '/full(no~)/path/to/rails-port/db/functions/libpgosm',
'maptile_for_point' LANGUAGE C STRICT;"
psql -d openstreetmap -c "CREATE FUNCTION tile_for_point(int4, int4)
RETURNS int8 AS '/full(no~)/path/to/rails-port/db/functions/libpgosm',
'tile_for_point' LANGUAGE C STRICT;"
psql -d osm -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS
'/full(no~)/path/to/rails-port/db/functions/libpgosm', 'tile_for_point'
LANGUAGE C STRICT;"
exit

Please let me know if anything looks immediately obvious as wrong...

Thanks, Jeff

On Sun, Oct 21, 2012 at 9:12 PM, John Firebaugh <john.firebaugh at gmail.com>wrote:

> Yes, this looks like a quadtile extension issue:
>
> [2010-04-03 10:55:00.000000 #29782] PG::Error: ERROR:  function maptile_for_point(integer, integer, integer) does not exist
>
> LINE 1: SELECT COUNT(*) AS count_all, maptile_for_point(latitude, lo...
>
>
> I'm guessing the issue may be that you need to replace
> '/full(no~)/path/to/rails-port' in the "Installing the quadtile
> functions" instructions on the wiki with the appropriate path on your
> machine. Try that and gist the output if you get any errors.
>
> Sorry this is so fiddly, it's on my TODO list to make this part of the
> setup easier.
>
> John
>
> On Sun, Oct 21, 2012 at 9:03 PM, Jeff Meyer <jeff at gwhat.org> wrote:
>
>> You bet!
>>
>> Failing relation_controller_test: https://gist.github.com/3929553
>>
>> Failing ApiControllerTest: https://gist.github.com/3929564
>>
>> Thanks, Jeff
>>
>>
>> On Sun, Oct 21, 2012 at 8:28 PM, John Firebaugh <john.firebaugh at gmail.com
>> > wrote:
>>
>>> Hi Jeff,
>>>
>>> Can you gist your log/test.log as well? Ideally from a minimal test run
>>> (delete the log and rerun the failing test).
>>>
>>> John
>>>
>>>
>>> On Sun, Oct 21, 2012 at 8:22 PM, Jeff Meyer <jeff at gwhat.org> wrote:
>>>
>>>> Yes, but the instructions are a little vague for a new guy like me.
>>>> When I followed the steps below, I believe the maptile functions ended up
>>>> in the public schema, which may not be the correct place to put them.
>>>>
>>>> My comments from the Discussions section of that page:
>>>>
>>>> <discussion>
>>>>
>>>> In the Quadtile installation section, the user is asked to "log into
>>>> pgsql" and do...
>>>>
>>>> Log into PgSQL and execute the CREATE FUNCTION statement from maptile.c's comment:
>>>>
>>>> sudo -u postgres -i
>>>>
>>>> psql
>>>>
>>>> CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/full(no~)/path/to/rails-port/db/functions/libpgosm', 'maptile_for_point' LANGUAGE C STRICT;
>>>>
>>>> CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/full(no~)/path/to/rails-port/db/functions/libpgosm', 'tile_for_point' LANGUAGE C STRICT;
>>>>
>>>> Q: This will create functions in the public schema for the postgres
>>>> instance, which I believe should be fine, but I am not sure.
>>>> </discussion>
>>>>
>>>>
>>>>
>>>> On Sun, Oct 21, 2012 at 8:17 PM, John Firebaugh <
>>>> john.firebaugh at gmail.com> wrote:
>>>>
>>>>> On Sun, Oct 21, 2012 at 7:50 PM, Jeff Meyer <jeff at gwhat.org> wrote:
>>>>>
>>>>>> Trying to clean up the Rails Port installation instructions a bit,
>>>>>> but cannot seem to get the rake test stuff to work properly.
>>>>>>
>>>>>> I am getting a few errors along the way, but rake test doesn't appear
>>>>>> to complete, and fails with the following message:
>>>>>> Errors running test:functionals! #<RuntimeError: Command failed with
>>>>>> status (1): [/usr/bin/ruby1.8 -I"lib:test" -I"/usr/lib/...]>
>>>>>>
>>>>>> Full output at:
>>>>>> https://gist.github.com/3929354
>>>>>>
>>>>>> Anything obvious I might be doing wrong?
>>>>>>
>>>>>
>>>>> Did you install the quadtile functions?
>>>>>
>>>>>
>>>>> http://wiki.openstreetmap.org/wiki/The_Rails_Port#Installing_the_quadtile_functions
>>>>>
>>>>> John
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Jeff Meyer
>>>> Global World History Atlas
>>>> www.gwhat.org
>>>> jeff at gwhat.org
>>>> 206-676-2347
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Jeff Meyer
>> Global World History Atlas
>> www.gwhat.org
>> jeff at gwhat.org
>> 206-676-2347
>>
>>
>>
>


-- 
Jeff Meyer
Global World History Atlas
www.gwhat.org
jeff at gwhat.org
206-676-2347
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20121021/b9d00ef0/attachment.html>


More information about the rails-dev mailing list