[OSM-dev] Trying to upload data using API

sagar anand sagaranand.er at gmail.com
Wed Oct 15 06:06:49 BST 2008


On Wed, Oct 15, 2008 at 3:30 PM, sagar anand <sagaranand.er at gmail.com>wrote:

>
> Hi All
>
> I am sort of stuck here trying to upload data using the api. Initially when
> I ran ruby script/server at rails_port I got the folowing message:
> => Booting WEBrick...
> => Rails application started on *http://0.0.0.0:3000*
> => Ctrl-C to shutdown server; call with --help for options
> [2008-10-13 17:26:41] INFO  WEBrick 1.3.1
> [2008-10-13 17:26:41] INFO  ruby 1.8.6 (2008-08-11) [i386-linux]
> [2008-10-13 17:26:41] INFO  WEBrick::HTTPServer#start: pid=28627 port=3000
>
> I dont understand why it gives out http://0.0.0.0. I checked the
> database.yml file and hostname for the development environment is set to
> localhost with the correct username and password.
>
> I tried doing some troubleshooting with environment.rb file which is like
> I changed
> ENV['RAILS_ENV'] = 'development' ( which was set to production before)
>
> SERVER_URL = ENV ['OSM_SERVER_URL'] || 'yoursoftserver07.rmit.edu.au'
> (This is the url for the server I am using for our project.)
>
> I still cannot access http://localhost. It cant connect.
>
>
> I created some dummy data in the database using MYSQL query browser in the
> current_nodes table like node id =1, latitude =11, longitude =12, user_id
> =1, visible = 1, timestamp 0000-00-00 00:00:00, tile=0
>
> http://yoursoftserver07.cs.rmit.edu.au/api/0.5/node/1  dosent brings out
> anything.
>
> Now the ruby script/server shows the following error
> [team4 at yoursoftserver07 rails_port]$ ruby script/server
> => Booting WEBrick...
> => Rails application started on http://0.0.0.0:3000
> => Ctrl-C to shutdown server; call with --help for options
> [2008-10-15 14:37:18] INFO  WEBrick 1.3.1
> [2008-10-15 14:37:18] INFO  ruby 1.8.6 (2008-08-11) [i386-linux]
> [2008-10-15 14:37:18] WARN  TCPServer Error: Address already in use -
> bind(2)
> /usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Address already in
> use -
> bind(2) (Errno::EADDRINUSE)
>         from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
>         from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
>         from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
>         from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
>         from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
>         from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
>         from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
>         from
> /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:58:in
>  `new'
>          ... 7 levels...
>         from
> /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_o
> riginal_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `requi
> re'
>         from script/server:3
>

   *I think it is already using  port 3000 or probably running an previous
instance. It is quite possible I started one instance and I did not  close
it. When i try ruby sript/server -p 4000 .......... it runs fine. Is it a
way to fix the previous instance???
*

>
>
> I ll do some more reserach on the api. Meanwhile any sugggestions to use
> api for get/put will be highly appreciated. Please excuse me if I am just
> messing around and being stupid :-).
> We actually have to upload our results to our development database of
> openstreetmap using a mobile phone (Nokia N95)
>
> Thanks & Regards,
> Sagar
>
>
>
>


-- 
Sagar Anand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081015/490ca99b/attachment.html>


More information about the dev mailing list