<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Oct 15, 2008 at 3:30 PM, sagar anand <span dir="ltr"><<a href="http://sagaranand.er">sagaranand.er</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br clear="all">Hi All<br><br>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:<br>
=> Booting WEBrick...<br>=> Rails application started on <b><a href="http://0.0.0.0:3000" target="_blank">http://0.0.0.0:3000</a></b><br>
=> Ctrl-C to shutdown server; call with --help for options<br>[2008-10-13 17:26:41] INFO  WEBrick 1.3.1<br>[2008-10-13 17:26:41] INFO  ruby 1.8.6 (2008-08-11) [i386-linux]<br>[2008-10-13 17:26:41] INFO  WEBrick::HTTPServer#start: pid=28627 port=3000<br>

<br>I dont understand why it gives out <a href="http://0.0.0.0" target="_blank">http://0.0.0.0</a>. I checked the database.yml file and hostname for the development environment is set to localhost with the correct username and password.<br>

<br>I tried doing some troubleshooting with environment.rb file which is like<br>I changed <br>ENV['RAILS_ENV'] = 'development' ( which was set to production before)<br><br>SERVER_URL = ENV ['OSM_SERVER_URL'] || '<a href="http://yoursoftserver07.rmit.edu.au" target="_blank">yoursoftserver07.rmit.edu.au</a>'   (This is the url for the server I am using for our project.)<br>

<br>I still cannot access <a href="http://localhost" target="_blank">http://localhost</a>. It cant connect.<br><br><br>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<br>

<br><a href="http://yoursoftserver07.cs.rmit.edu.au/api/0.5/node/1" target="_blank">http://yoursoftserver07.cs.rmit.edu.au/api/0.5/node/1</a>  dosent brings out anything.<br><br>Now the ruby script/server shows the following error<br>
[team4@yoursoftserver07 rails_port]$ ruby script/server<br>
=> Booting WEBrick...<br>=> Rails application started on <a href="http://0.0.0.0:3000" target="_blank">http://0.0.0.0:3000</a><br>=> Ctrl-C to shutdown server; call with --help for options<br>[2008-10-15 14:37:18] INFO  WEBrick 1.3.1<br>

[2008-10-15 14:37:18] INFO  ruby 1.8.6 (2008-08-11) [i386-linux]<br>[2008-10-15 14:37:18] WARN  TCPServer Error: Address already in use - bind(2)<br>/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Address already in use -<br>

bind(2) (Errno::EADDRINUSE)<br>        from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'<br>        from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'<br>        from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'<br>

        from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'<br>        from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'<br>        from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'<br>

        from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'<br>        from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:58:in<br> `new'<br>         ... 7 levels...<br>        from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39<br>

        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_o<br>riginal_require'<br>        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `requi<br>re'<br>        from script/server:3</div>
</blockquote><div><br>   <i>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???<br>
</i></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br>
<br>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 :-).<br>We actually have to upload our results to our development database of openstreetmap using a mobile phone (Nokia N95)<br>

<br>Thanks & Regards,<br>Sagar<br><br><br><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Sagar Anand<br>
</div>