How to resolve 'loaderror: cannot load such file'?

Example:

  require 'non_existent_file'
  
Solution:

This error occurs when Ruby can't locate the file you are trying to require. Make sure the file exists and the path is correct.


  require './correct_path/to_file'
  

Beginner's Guide to Ruby