Neither ruby and nor irb can load .rb file in current directory

前端 未结 7 1297
慢半拍i
慢半拍i 2021-01-31 17:30

I\'m having a really noob problem with importing files in Ruby. I\'m making a Ruby app in Windows XP. All the class files for the app are in \"C:/Documents/Prgm/Surveyor_R

7条回答
  •  情书的邮戳
    2021-01-31 17:53

    it's damn dirty, but you can always do at the very first line:

    $: << '.'
    

    and off you go with pwd'ed require. It's quite useful for interactive/creative testing with IRB

提交回复
热议问题