Understanding Ruby's load paths

前端 未结 3 1871
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 03:39

I\'m a little confused about why my project can\'t load the files it needs, it\'s a really simple project tree:

processor/
  bin/
  lib/
    processor.rb
            


        
3条回答
  •  暖寄归人
    2020-11-28 04:08

    Use Ruby's require_relative in this case:

    require_relative "processor/mapper"
    

提交回复
热议问题