Exerb and autoload 'foo'

hi

I’m hsving a few problems when I use ‘autoload’ from a exerb executable.
I’ve got a module that looks like

module Backend
module Abstract
autoload :SQLite 'backend/sqlite’
autoload :MySQL ‘backend/mysql’

This all works fine when I run it as a normal ruby script, but when I
package this with exerb (using the correct ‘add_ruby_script’ line in the
…exr file) it doesn’t work. At the time when the appropriate module is
needed, the executable throws a LoadError because it can’t find
’backend/sqlite’. It works perfectly if I replace the ‘autoload’ line
with a vanilla

require ‘backend/sqlite’

Is this is a bug or am I doing something wrong?

A

Hi,

At Fri, 7 May 2004 09:03:58 +0900,
alex fenton wrote in [ruby-talk:99436]:

This all works fine when I run it as a normal ruby script, but when I
package this with exerb (using the correct ‘add_ruby_script’ line in the
…exr file) it doesn’t work. At the time when the appropriate module is
needed, the executable throws a LoadError because it can’t find
‘backend/sqlite’. It works perfectly if I replace the ‘autoload’ line
with a vanilla

require ‘backend/sqlite’

Exerb seems not to be supporting autoload yet.

···


Nobu Nakada