From: Peter Zotov Date: 2009-06-19T04:04:10+09:00 Subject: Re: Auto-Require some .rb files for specific .cgi page Marc Heiler wrote: > I am using Linux + Apache + ruby 1.8.7 (2009-06-08 patchlevel 173) > > I use quite many .cgi pages which are nothing more than .rb files > which output a html string. > > I found that every of this .cgi page requires my "web.rb" file. > > Is it somehow possible to auto-load this file _without_ doing > require 'web.rb'? It is tedious to require that web.rb for every > ruby .cgi page. I wonder if what I would like to have is > somehow possible at all. You can add '-r somefile.rb' to ruby command string, so the whole command will become 'ruby -r web.rb script.rb', for example. Try modifying shebang line/apache options/etc. for this. -- WBR, Peter Zotov