I have a Ruby code with different classes in a few files. In one file, I start the execution. This file require
s my other files.
- Is this a good way to start a ruby code?
- When I run the code from a symbolic link, for example
DIR2/MyRubyCode
is a link to the main fileDIR1/MyRubyCode.rb
, then my requires will fail. I solved the problem by adding the pathDIR1
to$LOAD_PATH
before therequire
, but I think there would be much better ways to do it. Do you have any suggestions about that?