Ruby 'require' error: cannot load such file

后端 未结 13 1515
抹茶落季
抹茶落季 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 05:55

    For those who are absolutely sure their relative path is correct, my problem was that my files did not have the .rb extension! (Even though I used RubyMine to create the files and selected that they were Ruby files on creation.)

    Double check the file extensions on your file!

提交回复
热议问题