Read contents of a local file into a variable in Rails January 19, 2023 by Tarik data = File.read("/path/to/file")