I want to parse .csv file which is in public folder, I\'ve tried /../\'s, #{RAILS_ROOT}/public but with no success (No such file or direct
public
/../
#{RAILS_ROOT}/public
You have access to the Rails.root path, use it to get a path
Rails.root
Rails.root.join("public", "filename.csv")
You'll possibly have to call to_s on it depending on how you want to use the result (as a Path object or as a string).
to_s
Path