i am getting following error on starting server by using “ruby
script/server webrick -b some_Ip_address” on Fedora 14 ,is anyone know
why this is coming ?
INFO WEBrick 1.3.1
[2012-01-18 04:37:13] INFO ruby 1.8.7 (2011-02-18) [i386-linux]
[2012-01-18 04:37:13] WARN TCPServer Error: Cannot assign requested
address - bind(2)
Exiting
/usr/lib/ruby/1.8/webrick/utils.rb:73:in initialize': Cannot assign requested address - bind(2) (Errno::EADDRNOTAVAIL) from /usr/lib/ruby/1.8/webrick/utils.rb:73:innew’
from /usr/lib/ruby/1.8/webrick/utils.rb:73:in create_listeners' from /usr/lib/ruby/1.8/webrick/utils.rb:70:ineach’
from /usr/lib/ruby/1.8/webrick/utils.rb:70:in create_listeners' from /usr/lib/ruby/1.8/webrick/server.rb:75:inlisten’
from /usr/lib/ruby/1.8/webrick/server.rb:63:in initialize' from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:ininitialize’
from
/usr/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/handler/webrick.rb:10:in new' from /usr/lib/ruby/gems/1.8/gems/rack-1.1.3/lib/rack/handler/webrick.rb:10:inrun’
from
/usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/commands/server.rb:111
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:in gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:inrequire’
from script/server:3
thanks peter for reply ,but sorry due some security reasons i can’t
provide you the ip address, you can consider some dummy ip in place of
myip in command .can you provide some solutions
On Wed, Jan 18, 2012 at 11:10 AM, sachin kewale [email protected]wrote:
from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/commands/server.rb:111
(show the exact command yoiu typed)
what is the output of
$ ifconfig
thanks peter for reply ,but sorry due some security reasons i can’t
provide you the ip address, you can consider some dummy ip in place of
myip in command .can you provide some solutions
Understood.
What I really wanted to double check if the ip address you are assigning
with -b is really a local address of the system …
As a reference, here is what it shows on this system. You can replay
those commands on your side to double check.
~/be$ rails s -b 192.168.0.105 # this works OK
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://192.168.0.105:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-01-18 12:15:02] INFO WEBrick 1.3.1
[2012-01-18 12:15:02] INFO ruby 1.9.3 (2011-10-30) [i686-linux]
[2012-01-18 12:15:02] INFO WEBrick::HTTPServer#start: pid=32052
port=3000
^C
[2012-01-18 12:15:07] INFO going to shutdown …
[2012-01-18 12:15:07] INFO WEBrick::HTTPServer#start done.
Exiting
~/be$ rails s -b 192.168.0.106 # this will FAIL (using non-local .106
here
!)
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://192.168.0.106:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-01-18 12:15:13] INFO WEBrick 1.3.1
[2012-01-18 12:15:13] INFO ruby 1.9.3 (2011-10-30) [i686-linux]
[2012-01-18 12:15:13] WARN TCPServer Error: Cannot assign requested
address - bind(2)
Exiting
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/utils.rb:85:in
`initialize’: Cannot assign requested address - bind(2)
(Errno::EADDRNOTAVAIL)
HTH,
Peter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.