Read contents of a local file into a variable in Rails

data = File.read("/path/to/file")

Leave a Comment