Ruby pisz JSON do pliku

require 'json'
File.open("filename.json", "w") do |f|
  f.write(JSON.pretty_generate(my_hash))
end
Nice Nightingale