How to do a safe join pathname in ruby? October 12, 2022 by Tarik I recommend using File.join >> File.join("path", "to", "join") => "path/to/join"