Skip to content

Instantly share code, notes, and snippets.

@andriyun
Last active August 17, 2021 17:39
Show Gist options
  • Save andriyun/22f97a7f820f27c17a4c10a7e62c991b to your computer and use it in GitHub Desktop.
Save andriyun/22f97a7f820f27c17a4c10a7e62c991b to your computer and use it in GitHub Desktop.
How to write debug into file in Ruby on Rails in controller
...
File.write("/path/to/log.txt", variable.inspect, mode: "a")
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment