Skip to content

Instantly share code, notes, and snippets.

@hsbt
Created July 30, 2012 06:30
Show Gist options
  • Save hsbt/3205336 to your computer and use it in GitHub Desktop.
Save hsbt/3205336 to your computer and use it in GitHub Desktop.
open('.env') do |file|
file.readlines.each do |line|
line.scan(/(.*)\=(.*)/) do |key, val|
ENV[key] = val
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment