Soft gadget

Free software and free web resource. Workplace, vitual office and social software links

Wednesday, December 07, 2005

webrick can not start - how to repair rails

E:\work\depot>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
[2005-12-08 10:46:17] INFO WEBrick 1.3.1
[2005-12-08 10:46:17] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]
[2005-12-08 10:46:17] WARN TCPServer Error: Only one usage of each socket addre
ss (protocol/network address/port) is normally permitted. - bind(2)
c:/ruby/lib/ruby/1.8/webrick/utils.rb:62:in `initialize': Only one usage of each
socket address (protocol/network address/port) is normally permitted. - bind(2)
(Errno::EADDRINUSE)
from c:/ruby/lib/ruby/1.8/webrick/utils.rb:62:in `new'
from c:/ruby/lib/ruby/1.8/webrick/utils.rb:62:in `create_listeners'
from c:/ruby/lib/ruby/1.8/webrick/utils.rb:59:in `each'
from c:/ruby/lib/ruby/1.8/webrick/utils.rb:59:in `create_listeners'
from c:/ruby/lib/ruby/1.8/webrick/server.rb:72: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-0.14.3/lib/webrick_server.rb:6
1:in `new'
... 6 levels...
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_suppo
rt/dependencies.rb:214:in `require'
from script/server:3

E:\work\depot>namp
'namp' is not recognized as an internal or external command,
operable program or batch file.

E:\work\depot>netstat

Active Connections

Proto Local Address Foreign Address State
TCP osbpc430:1168 10.1.0.11:netbios-ssn ESTABLISHED
TCP osbpc430:1177 10.1.0.5:1745 ESTABLISHED
TCP osbpc430:1256 10.1.0.5:58352 ESTABLISHED
TCP osbpc430:1348 10.1.0.15:netbios-ssn ESTABLISHED
TCP osbpc430:1399 10.1.0.38:8080 TIME_WAIT
TCP osbpc430:1400 10.1.0.38:8080 TIME_WAIT
TCP osbpc430:1401 10.1.0.14:81 TIME_WAIT
TCP osbpc430:5951 10.1.1.182:1081 ESTABLISHED
TCP osbpc430:1074 localhost:1075 ESTABLISHED
TCP osbpc430:1075 localhost:1074 ESTABLISHED
TCP osbpc430:1078 localhost:1079 ESTABLISHED
TCP osbpc430:1079 localhost:1078 ESTABLISHED
TCP osbpc430:1325 localhost:1326 ESTABLISHED
TCP osbpc430:1326 localhost:1325 ESTABLISHED


E:\work\depot>ruby script/server --binding=127.0.0.1
=> Booting WEBrick...
=> Rails application started on http://127.0.0.1:3000
=> Ctrl-C to shutdown server; call with --help for options
[2005-12-08 10:59:11] INFO WEBrick 1.3.1
[2005-12-08 10:59:11] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]
[2005-12-08 10:59:11] INFO WEBrick::HTTPServer#start: pid=1840 port=3000


-------------------
Or add following lines into file server in fold /script

OPTIONS = {
:port => 3000,
:ip => "127.0.0.1",
:environment => "development",
:server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"),
:server_type => WEBrick::SimpleServer
}

0 Comments:

Post a Comment

<< Home