Forum: Ruby on Rails RAGI Gem - Running an additional server thread

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Muppet M. (Guest)
on 2006-02-01 17:29
I have RoR running and have configured RAGI (per the new tutorial
provided at ETel but I get this:

user# script/server
=> Booting WEBrick...
[2006-01-30 14:20:25] INFO RAGI::CallServer: default-handler= port=4573
[2006-01-30 14:20:25] INFO WEBrick 1.3.1
[2006-01-30 14:20:25] INFO ruby 1.8.2 (2004-12-25) [i586-linux]
[2006-01-30 14:20:25] WARN TCPServer Error: Address already in use -
[2006-01-30 14:20:25] INFO WEBrick::GenericServer#start: pid=13375
[2006-01-30 14:20:25] INFO RAGI::CallServer: server shutdown port=4573
=> Rails application started on
=> Ctrl-C to shutdown server; call with --help for options
[2006-01-30 14:20:25] INFO WEBrick 1.3.1
[2006-01-30 14:20:25] INFO ruby 1.8.2 (2004-12-25) [i586-linux]
[2006-01-30 14:20:25] INFO WEBrick::HTTPServer#start: pid=13375

Nothing is configured to run on (xinetd) or is running on port 4573, and
yet I get this error. Also, I tried to change the default port in:

ragi-1.0.1/ragi # vi config.rb

but I get the same error for any port I try to use. How do I get this to
Guido S. (Guest)
on 2006-02-02 18:15
(Received via mailing list)
Use config.rb for standalone RAGI programs. If you want RAGI to run
from within Rails, instead place something like the following in
environment.rb (not config.rb)

# ragi configuration

require 'webrick'

Dependencies.mechanism = :require # class loading magic

class SimpleThreadServer < WEBrick::SimpleServer
  def SimpleThreadServer.start(&block) do

require 'ragi/call_server' => SimpleThreadServer )

I've found that it works best for me when I place ragi under the lib
directory in the rails project. If you have more problems, please post
more details ... also check that there are no existing instances of
ragi or other asterisk gateway interface programs.

You can always try doing telnet to port 4573 (e.g. telnet localhost
4573) to verify that there's nothing running on that port. If there's
nothing running, you should get connection refused.

-- G.
This topic is locked and can not be replied to.