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

前端 未结 7 1136
慢半拍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 18:06

    How about this command? A little cumbersome to write but really clean and it should always work:

    ➜ $ irb
    > require "#{Dir.pwd}/file_to_load.rb"
    => true 
    
    0 讨论(0)
提交回复
热议问题