Webrick help

Hi all,
Need help from you all

···

#+++++++++++++++++++++++++++++++++++++++=
#file start_webrick.rb

require 'webrick'
include WEBrick
load('class.index.rb')

def start_webrick(config = {}) config.update(:Port => 80)
    config.update(:DirectoryIndex => 'coreLoader.rb')
    $server = HTTPServer.new(config)
    yield server if block_given?
    ['INT','TERM'].each { |signal|
        trap(signal) {server.shutdown}
    }
    $server.mount('/index',Index) $server.start
end
   start_webrick(:DocumentRoot => File.dirname(__FILE__))

#++++++++++++++++++++++++++++++++++++++++
#file class.index.rb
class Index < HTTPServlet::AbstractServlet
     def do_GET(req,resp)
       $Layout = ''
        load('coreLoader.rb')
        resp.body = $Layout end
       def Index.get_instance config, *options
        load __FILE__
        load('coreLoader.rb') Index.new config, *options end
   end

#+++++++++++++++++++++++++++++++++++++++++++

Any body know how to make file 'coreLoader.rb' always 're-loaded' when browser visit http://localhost/index/xxx/yyy
The reason is 'coreLoader.rb' is the only entry for my website framework. so the result of load('coreLoader.rb') not always the same

regards
Eko

try using require "auto-reload.rb"
can be found in mod_ruby distribution.
btw, your email client is buggy. all
your lines are wrapping. so the source
is nonsensical.

Alex

···

On Feb 25, 2005, at 1:51 AM, Eko Budi Setiyo wrote:

Hi all,
Need help from you all
#+++++++++++++++++++++++++++++++++++++++=
#file start_webrick.rb

require 'webrick'
include WEBrick
load('class.index.rb')

def start_webrick(config = {}) config.update(:Port => 80)
   config.update(:DirectoryIndex => 'coreLoader.rb')
   $server = HTTPServer.new(config)
   yield server if block_given?
   ['INT','TERM'].each { |signal|
       trap(signal) {server.shutdown}
   }
   $server.mount('/index',Index) $server.start
end
  start_webrick(:DocumentRoot => File.dirname(__FILE__))

#++++++++++++++++++++++++++++++++++++++++
#file class.index.rb
class Index < HTTPServlet::AbstractServlet
   def do_GET(req,resp)
      $Layout = ''
       load('coreLoader.rb')
       resp.body = $Layout end
     def Index.get_instance config, *options
       load __FILE__
       load('coreLoader.rb') Index.new config, *options end
  end

#+++++++++++++++++++++++++++++++++++++++++++

Any body know how to make file 'coreLoader.rb' always 're-loaded' when browser visit http://localhost/index/xxx/yyy
The reason is 'coreLoader.rb' is the only entry for my website framework. so the result of load('coreLoader.rb') not always the same

regards
Eko

Alexander Kellett wrote:

try using require "auto-reload.rb"
can be found in mod_ruby distribution.
btw, your email client is buggy. all
your lines are wrapping. so the source
is nonsensical.

Alex

Hi all,
Need help from you all
#+++++++++++++++++++++++++++++++++++++++=
#file start_webrick.rb

require 'webrick'
include WEBrick
load('class.index.rb')

def start_webrick(config = {}) config.update(:Port => 80)
   config.update(:DirectoryIndex => 'coreLoader.rb')
   $server = HTTPServer.new(config)
   yield server if block_given?
   ['INT','TERM'].each { |signal|
       trap(signal) {server.shutdown}
   }
   $server.mount('/index',Index) $server.start
end
  start_webrick(:DocumentRoot => File.dirname(__FILE__))

#++++++++++++++++++++++++++++++++++++++++
#file class.index.rb
class Index < HTTPServlet::AbstractServlet
   def do_GET(req,resp)
      $Layout = ''
       load('coreLoader.rb')
       resp.body = $Layout end
     def Index.get_instance config, *options
       load __FILE__
       load('coreLoader.rb') Index.new config, *options end
  end

#+++++++++++++++++++++++++++++++++++++++++++

Any body know how to make file 'coreLoader.rb' always 're-loaded' when browser visit http://localhost/index/xxx/yyy
The reason is 'coreLoader.rb' is the only entry for my website framework. so the result of load('coreLoader.rb') not always the same

regards
Eko

thanks

I will try using it

···

On Feb 25, 2005, at 1:51 AM, Eko Budi Setiyo wrote:

Eko Budi Setiyo wrote:

Alexander Kellett wrote:

try using require "auto-reload.rb"
can be found in mod_ruby distribution.
btw, your email client is buggy. all
your lines are wrapping. so the source
is nonsensical.

Alex

Hi all,
Need help from you all
#+++++++++++++++++++++++++++++++++++++++=
#file start_webrick.rb

require 'webrick'
include WEBrick
load('class.index.rb')

def start_webrick(config = {}) config.update(:Port => 80)
   config.update(:DirectoryIndex => 'coreLoader.rb')
   $server = HTTPServer.new(config)
   yield server if block_given?
   ['INT','TERM'].each { |signal|
       trap(signal) {server.shutdown}
   }
   $server.mount('/index',Index) $server.start
end
  start_webrick(:DocumentRoot => File.dirname(__FILE__))

#++++++++++++++++++++++++++++++++++++++++
#file class.index.rb
class Index < HTTPServlet::AbstractServlet
   def do_GET(req,resp)
      $Layout = ''
       load('coreLoader.rb')
       resp.body = $Layout end
     def Index.get_instance config, *options
       load __FILE__
       load('coreLoader.rb') Index.new config, *options end
  end

#+++++++++++++++++++++++++++++++++++++++++++

Any body know how to make file 'coreLoader.rb' always 're-loaded' when browser visit http://localhost/index/xxx/yyy
The reason is 'coreLoader.rb' is the only entry for my website framework. so the result of load('coreLoader.rb') not always the same

regards
Eko

thanks

I will try using it

Doesn't work

regards
Eko

···

On Feb 25, 2005, at 1:51 AM, Eko Budi Setiyo wrote: