I have inside app a directory called csv and inside this dir I have a file called names.csv I want to use File.read(path:string)
app
csv
names.csv
File.read(path:string)
Rails.root points to the top folder of your rails project, so the path would be:
Rails.root
File.read(File.join(Rails.root, 'app','csv','names.csv'))