On Sep 9, 1:35 pm, Yehuda Katz <[email protected]> wrote: > You're passing an absolute path to require_relative. You can do > require_relative library.
The path that gets sent to relative_root has this value: bin/../../lib/forex/hll_forex_ca_feed That does not appear to me to be an absolute path. > > That said, in my opinion, require_relative is a misfeature. You should > always put the appropriate paths on the load path, and require things > relative to it. If your library is called "zoom", you should do require > "zoom/library_name", not require File.dirname(__FILE__) + "library_name" > from the zoom directory. > I would very much prefer that Ruby-1.9.2 retained the cwd (.) in the load path and then all of this jiggery-pokery with require_relative would not be necessary at all. However that may be. When I run this code in 1.8.7 under Rails-2.3.8 the script runs without error and produces the expected output. With 1.9.2 and Rails-2.3.8 it also runs without error, albeit requires the additional ../. I just do not understand why the additional ../ is required for 1.9.2 require_relative. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
