I seem to be having trouble with Rails finding the appropriate path to a textfile I would like to load into memory for processing, for a personal learning project.
require "#{RAILS_ROOT}/lib/english.txt"
or
require "/lib/english.txt"
are not working.
The textfile is located in the lib
directory.
I am trying to load it from a simple controller. I continue to get errors:
MissingSourceFile in EntriesController#anagram
no such file to load -- /Users/me/Sites/cvtest/lib/english.txt
The above path is actually where the file is located according to my computer's info (OSX). What is it that I am doing incorrectly? Thank you.