Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
gem 'activesupport'
require 'active_support/core_ext/hash/deep_merge'
require 'psych'
first_hash = Psych.load_file(PATH_TO_FIRST_FILE)
second_hash = Psych.load_file(PATH_TO_SECOND_FILE)
File.write(PATH_TO_MERGED_FILE, Psych.dump(first_hash.deep_merge(second_hash)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.