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....<div><br></div><div>(Fixed, apart from an Attribute redefined error I'll track down separately).<br>
<br>Correct commands (updated on the wiki...):</div><div><br></div><div><div>sudo -u postgres -i</div><div>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;"</div>
<div>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;"</div><div>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;"</div>
<div>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;"</div><div>exit</div><div>
<br></div><div>Please let me know if anything looks immediately obvious as wrong...</div><div><br></div><div>Thanks, Jeff</div></div><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 9:12 PM, John Firebaugh <span dir="ltr"><<a href="mailto:john.firebaugh@gmail.com" target="_blank">john.firebaugh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, this looks like a quadtile extension issue:<div><br></div><div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:12px;line-height:1.4em;font-family:'Bitstream Vera Sans Mono',Courier,monospace">
<div style="margin:0px;padding:0px 0px 0px 1em;line-height:1.4em">[2010-04-03 10:55:00.000000 #29782] PG::Error: ERROR:  function maptile_for_point(integer, integer, integer) does not exist</div>
<div style="margin:0px;padding:0px 0px 0px 1em;line-height:1.4em">
LINE 1: SELECT COUNT(*) AS count_all, maptile_for_point(latitude, lo...</div><div><br></div><div><br></div></pre>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.</div>


<div><br></div><div>Sorry this is so fiddly, it's on my TODO list to make this part of the setup easier.</div><div class="HOEnZb"><div class="h5"><div><br></div><div>John</div><div><div class="gmail_quote"><br></div>
<div class="gmail_quote">On Sun, Oct 21, 2012 at 9:03 PM, Jeff Meyer <span dir="ltr"><<a href="mailto:jeff@gwhat.org" target="_blank">jeff@gwhat.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You bet!<div><br></div><div>Failing relation_controller_test: <a href="https://gist.github.com/3929553" target="_blank">https://gist.github.com/3929553</a></div>


<div><br></div><div>Failing ApiControllerTest: <a href="https://gist.github.com/3929564" target="_blank">https://gist.github.com/3929564</a></div>
<div><br></div><div>Thanks, Jeff<div><div><br><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 8:28 PM, John Firebaugh <span dir="ltr"><<a href="mailto:john.firebaugh@gmail.com" target="_blank">john.firebaugh@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jeff,<div><br></div><div>Can you gist your log/test.log as well? Ideally from a minimal test run (delete the log and rerun the failing test).</div>



<span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888">John</font></span><div><div><div><br><div><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 8:22 PM, Jeff Meyer <span dir="ltr"><<a href="mailto:jeff@gwhat.org" target="_blank">jeff@gwhat.org</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<div>





<br></div>
<div>My comments from the Discussions section of that page:<div><br></div><div><discussion></div><div><p style="line-height:19.19999885559082px;font-size:12.666666984558105px;font-family:sans-serif;margin:0.4em 0px 0.5em">






In the Quadtile installation section, the user is asked to "log into pgsql" and do...</p><pre style="font-family:monospace,'Courier New';padding:1em;border:1px dashed rgb(47,111,171);background-color:rgb(249,249,249);line-height:1.1em;font-size:1.2em;white-space:pre-wrap;word-wrap:break-word">
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;
</pre><p style="line-height:19.19999885559082px;font-size:12.666666984558105px;font-family:sans-serif;margin:0.4em 0px 0.5em">Q: This will create functions in the public schema for the postgres instance, which I believe should be fine, but I am not sure.</p>






<div></discussion></div><div><div><div><br></div><div><br></div><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 8:17 PM, John Firebaugh <span dir="ltr"><<a href="mailto:john.firebaugh@gmail.com" target="_blank">john.firebaugh@gmail.com</a>></span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Sun, Oct 21, 2012 at 7:50 PM, Jeff Meyer <span dir="ltr"><<a href="mailto:jeff@gwhat.org" target="_blank">jeff@gwhat.org</a>></span> wrote:<br>






</div><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Trying to clean up the Rails Port installation instructions a bit, but cannot seem to get the rake test stuff to work properly.<div><br></div><div>I am getting a few errors along the way, but rake test doesn't appear to complete, and fails with the following message:</div>









<div><div>Errors running test:functionals! #<RuntimeError: Command failed with status (1): [/usr/bin/ruby1.8 -I"lib:test" -I"/usr/lib/...]></div></div><div><br></div><div>Full output at:</div><div><a href="https://gist.github.com/3929354" target="_blank">https://gist.github.com/3929354</a><br>









<div><div><br></div><div>Anything obvious I might be doing wrong?</div></div></div></blockquote><div><br></div></div><div>Did you install the quadtile functions?</div><div><br></div><div><a href="http://wiki.openstreetmap.org/wiki/The_Rails_Port#Installing_the_quadtile_functions" target="_blank">http://wiki.openstreetmap.org/wiki/The_Rails_Port#Installing_the_quadtile_functions</a></div>






<span><font color="#888888">

<div><br></div><div>John</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><div>-- <br><font size="1">Jeff Meyer<br>Global World History Atlas<br><a href="http://www.gwhat.org" target="_blank">www.gwhat.org</a><br><a href="mailto:jeff@gwhat.org" target="_blank">jeff@gwhat.org</a><br>






<a href="tel:206-676-2347" value="+12066762347" target="_blank">206-676-2347</a><br></font><br><br>
</div></div></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><font size="1">Jeff Meyer<br>Global World History Atlas<br><a href="http://www.gwhat.org" target="_blank">www.gwhat.org</a><br><a href="mailto:jeff@gwhat.org" target="_blank">jeff@gwhat.org</a><br>



<a href="tel:206-676-2347" value="+12066762347" target="_blank">206-676-2347</a><br></font><br><br>
</div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><font size="1">Jeff Meyer<br>Global World History Atlas<br><a href="http://www.gwhat.org" target="_blank">www.gwhat.org</a><br><a href="mailto:jeff@gwhat.org" target="_blank">jeff@gwhat.org</a><br>
206-676-2347<br></font><br><br>