Iñaki Baz Castillo wrote:
> El Viernes 03 Abril 2009, Elias Orozco escribió:
>> I haven't require yet. So can anyone help or give me any hint on how to
>> load them all dynamically and deal with those dependencies?
> 
> path = File.dirname(__FILE__) + "/files_dir"
> 
> require "#{path}/required_file1"
> require "#{path}/required_file2"
> require "#{path}/required_file3"
> 
> Dir.chdir(path)
> Dir["*.rb"].each do |file|
>         require "#{path}/#{file}"
> end

Thanks Inaki, but in that example I will have to specify the require 
files and that's exactly what I don't want. A lot of classes will be 
copied into that folder and I can't hard-code all those requires.
-- 
Posted via http://www.ruby-forum.com/.