Webrick, Port 3000 and ActiveSync
Last night I decided to resurrect my attempts to learn RubyOnRails. I initially started learning ROR towards the end of last year but it soon fizzled out with the amount of work I’ve had on of late.
Given the amount of time that had passed since my initial look at ROR I decided to reinstall everything, and start reading Agile Web Development with Rails from the beginning.
My first hurdle was that I couldn’t fire Webrick under windows. With the following error message being output:
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with –help for options
[2006-09-23 11:03:55] INFO WEBrick 1.3.1
[2006-09-23 11:03:55] INFO ruby 1.8.5 (2006-08-25) [i386-mswin32]
[2006-09-23 11:03:55] WARN TCPServer Error: Bad file descriptor - bind(2)
C:/ruby/lib/ruby/1.8/webrick/utils.rb:73:in `initialize’: Bad file descriptor -
bind(2) (Errno::EBADF)
from C:/ruby/lib/ruby/1.8/webrick/utils.rb:73:in `new’
from C:/ruby/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners’
from C:/ruby/lib/ruby/1.8/webrick/utils.rb:70:in `each’
from C:/ruby/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners’
from C:/ruby/lib/ruby/1.8/webrick/server.rb:75:in `listen’
from C:/ruby/lib/ruby/1.8/webrick/server.rb:63:in `initialize’
from C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize’
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:59
:in `new’
… 6 levels…
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge
m_original_require’
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire’
from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require’
from script/server:3
For anyone encountering this error, be aware that Webrick binds to Port 3000 as default, for people like myself using Active Sync this port will already be in use along with a number of others within this range.
If you’re unsure use the netstat command in dos to review which ports are in use.
Success was guaranteed using:
ruby script/server -p 8000
About this entry
You’re currently reading “ Webrick, Port 3000 and ActiveSync ,” an entry on Mike Howarth: Web Developer
- Published:
- 9.23.06 / 10am
- Category:
- Ruby
No comments
Jump to comment form | comments rss [?] | trackback uri [?]