[OSM-dev] Using the API from the dev server: is it possible?

nick at hogweed.org nick at hogweed.org
Wed Apr 5 07:39:58 BST 2006


Hello everyone,

I'm having quite a job trying to use the API on the dev server. I've setup the 
dev server according to the instructions, and added some test data to the 
database. However when I try to use it, using URLs such as

http://nick.dev.openstreetmap.org/ruby/api/0.3/map.rb?bbox=-1,51,0,52

one of two things happens:

1. I don't get my own data out, but some other map data. I have configured the 
servinfo.rb so it uses my database login and password.

2. Worse, I get the dreaded Internal Server Error.

Same happens if I try to request a way e.g.

http://nick.dev.openstreetmap.org/ruby/api/0.3/multi.rb?multiid=223

(which is a real way in my database on the server) - either I get no data, or 
an internal server error.

The "real OSM server" style URLs such as

http://nick.dev.openstreetmap.org/api/0.3/way/223

give me a 404 not found error.

It seems to be looking at one of Steve's config files as I get this repeatedly 
in my error log:

[Wed Apr 05 08:31:47 2006] [error] mod_ruby: error in ruby
[Wed Apr 05 08:31:47 2006] [error] 
mod_ruby: /var/www/steve/ruby/api/osm/osmlog.rb:17:in `log': uninitialized 
constant Osmlog::Error (NameError)
[Wed Apr 05 08:31:47 2006] [error] mod_ruby:   
from /var/www/steve/ruby/api/osm/dao.rb:188:in `check_user?'
[Wed Apr 05 08:31:47 2006] [error] mod_ruby:   
from /var/www/steve/ruby/api/apache/simple-auth.rb:26:in `authenticate'

However, the following command

nick at dev:/var/www/nick$ find ruby  -exec grep -Hi steve {} \;

gives me no hits.

It seems I'm missing a few configuration steps.
Is anyone successfully using the API on the dev server?

Thanks,
Nick




More information about the dev mailing list