From: Emmanuel Touzery Date: 2003-04-18T16:14:22+09:00 Subject: newbie question Hello, Sorry, it's probably a very basic question, but I can't find the answer on the net... I want to load other ruby files as "plugins" from my program. I thought using "require" to load the file, eg: Dir.open('myplugins').each { |plugin| next if plugin == '.' || plugin == '..' puts "now treating plugin #{plugin}" require 'myplugins/' + plugin # instanciate our class : # eval('pluginObject =' + plugin + '.new') } But it fails, apparently because the parameter for require must be CONSTANT: test.rb:4:in `require': ./myplugins/poptv.rb:1: class/module name must be CONSTANT (SyntaxError) from test.rb:4 from test.rb:1:in `each' from test.rb:1 require ('myplugins/' + plugin).freeze does the same. any idea? shoud I use something else than 'require'? some form of eval? thank you, emmanuel -- "If there is any kind of God, it's not in you or in me, but in the space between us" -- Celine, "Before Sunrise" (It's not about what you do, it's about what you give.)