I have a directory structure that looks like this:
- lib
- yp-crawler (directory)
- file-a.rb
- file-b.rb
- file-c.rb
- yp-crawler.rb
My lib/yp-crawler.rb file looks like this:
require "yp-crawler/file-c"
require "yp-crawler/file-b"
require "yp-crawler/file-a"
module YPCrawler
end
When I try to run my file at the command line by doing this:
ruby lib/yp-crawler.rb
I get this error:
`require': cannot load such file -- yp-crawler/file-c (LoadError)
from .rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/yp-crawler.rb:1:in `<main>'
What could be causing this?
require_relative "file-a"?