Ruby On Rails

Back to -Products -Sapphire-IDE -FAQ -Ruby On Rails

When I try to debug a Rails application, WEBrick (or Mongrel) bombs out with error messages.

I’ve set my Rails app to run with the WEBrick (or Mongrel) server. I click the One-Click debugger button and the server seems to start but then shuts down again after showing error messages like these:

Running WebBrick service ...
RAILS_ROOT: G:/railsapps/depot/MyDepotApp
=> Booting WEBrick...
=> Rails application started on
=> Ctrl-C to shutdown server; call with --help for options
[2007-04-08 17:49:59] INFO  WEBrick 1.3.1
[2007-04-08 17:49:59] INFO  ruby 1.8.5 (2006-08-25) [i386-mswin32]
[2007-04-08 17:49:59] WARN  TCPServer Error: Bad file descriptor - bind(2)
G:\webdev\ruby\lib\ruby\1.8\webrick\utils.rb:73:in `initialize': Bad file descriptor - bind(2) (Errno::EBADF)
        from G:\webdev\ruby\lib\ruby\1.8\webrick\utils.rb:73:in `new'
        from G:\webdev\ruby\lib\ruby\1.8\webrick\utils.rb:73:in `create_listeners'
        from G:\webdev\ruby\lib\ruby\1.8\webrick\utils.rb:70:in `each'
        from G:\webdev\ruby\lib\ruby\1.8\webrick\utils.rb:70:in `create_listeners'
        from G:\webdev\ruby\lib\ruby\1.8\webrick\server.rb:75:in `listen'
        from G:\webdev\ruby\lib\ruby\1.8\webrick\server.rb:63:in `initialize'
        from G:\webdev\ruby\lib\ruby\1.8\webrick\httpserver.rb:24:in `initialize'
        from G:\webdev\ruby\lib\ruby\gems\1.8\gems\rails-1.2.2\lib\webrick_server.rb:58:in `new'
         ... 7 levels...
        from G:\webdev\ruby\lib\ruby\gems\1.8\gems\rails-1.2.2\lib\commands\server.rb:39
        from G:\webdev\ruby\lib\ruby\site_ruby\1.8\rubygems\custom_require.rb:27:in `gem_original_require'
        from G:\webdev\ruby\lib\ruby\site_ruby\1.8\rubygems\custom_require.rb:27:in `require'
        from C:\Program Files\SapphireSteel Software\Ruby In Steel\v1.0\Scripts\webbrick_service.rb:6

What am I doing wrong?

These errors are typically produced when the specified port number (e.g. 3000) is already being used by something else such as another server on your PC. You can try using a new port (e.g. 3001 or 3003 or similar) by setting the port number in Tools->Options->Projects and Solutions->Ruby In Steel. Once you have done this, try running your application once again. Be sure to enter the new port number into the address bar of the browser (e.g. http://localhost:3003 followed by the full path (e.g. http://localhost:3003/store).

Bookmark and Share   Keywords:  cylon  error message  Ruby In Steel 1  server
© SapphireSteel Software 2014