[MacRuby-devel] [MacRuby] #558: unable to require files.

MacRuby ruby-noreply at macosforge.org
Wed Jan 13 13:34:05 PST 2010

#558: unable to require files.
 Reporter:  tvmoore@…        |       Owner:  lsansonetti@…        
     Type:  defect           |      Status:  new                  
 Priority:  blocker          |   Milestone:  MacRuby 0.5          
Component:  MacRuby          |    Keywords:                       
 lib_file =
 require "#{lib_file}"

 The result from this is students-v-ldap.rb:in `<main>': no such file to
 load /Volumes/DMDNTech/scripts/ruby/dmdnlib/lib/lib.rb (LoadError)

 I have tried to load said lib.rb by requiring in macirb with an explicit

 irb(main):002:0> require '/Volumes/DMDNTech/scripts/ruby/dmdnlib/lib/lib'
 LoadError: no such file to load --

 macruby /Volumes/DMDNTech/scripts/ruby/dmdnlib/lib/lib.rb runs without any

 I need this to work as lib.rb apart from some globals puts all of my
 library folders into the load path.

 Dir.glob("#{$DMDN_ENV[:root]}/**/**").each do |f|
   next if !File.directory?(f)
   next if f =~ /\.app/
   $LOAD_PATH << f

 I then only ever need to use require 'x' instead of an explicit path.

Ticket URL: <http://www.macruby.org/trac/ticket/558>
MacRuby <http://macruby.org/>

More information about the MacRuby-devel mailing list