Skip to content

Instantly share code, notes, and snippets.

@nguyendangminh
Created December 9, 2014 02:40
Show Gist options
  • Save nguyendangminh/8b8622aa41fce8d23517 to your computer and use it in GitHub Desktop.
Save nguyendangminh/8b8622aa41fce8d23517 to your computer and use it in GitHub Desktop.
Reading YAML config file in Ruby
# config.rb
require 'yaml'
config = YAML.load_file('config/config.yml')
puts config['user_data']
# config.yml
user_data: 'hello world'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment