I have the following two files: main.rb and sort.rb located in the same folder. In main.rb , I have the following code:
require 'sort' Sort.insertion_sort([1,2,3,4]).each {|x| print "#{x}, "}
When I try to run this through ruby main.rb, I get the following error:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- sort (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from main.rb:1:in `<main>'
Any ideas why? Thanks
source share