F
francisrammeloo
Hi all,
Suppose I have following code:
require "./Classes/Printer" # My personal printer class
Now if I want to run my program Ruby needs to find the Printer.rb file
in the Classes directory. But if the script was run like this:
Then the current path will be ~ and Ruby won't find
../Classes/Printer.rb
How do I solve this problem?
Greetings,
Francis
Suppose I have following code:
require "./Classes/Printer" # My personal printer class
Now if I want to run my program Ruby needs to find the Printer.rb file
in the Classes directory. But if the script was run like this:
cd ~
ruby ~/rubydev/projects/texteditor/main.rb
Then the current path will be ~ and Ruby won't find
../Classes/Printer.rb
How do I solve this problem?
Greetings,
Francis