Ruby 'require' error: cannot load such file

后端 未结 13 1478
抹茶落季
抹茶落季 2020-12-02 05:07

I\'ve one file, main.rb with the following content:

require \"tokenizer.rb\"

The tokenizer.rb file is in the same directory and it

13条回答
  •  旧巷少年郎
    2020-12-02 06:00

    require loads a file from the $LOAD_PATH. If you want to require a file relative to the currently executing file instead of from the $LOAD_PATH, use require_relative.

提交回复
热议问题