# Pastebin gfq8dUvJ envfile = File.join(Dir.getwd, ".env") if File.exist?(envfile) require 'erb' env = ERB.new(File.read(envfile)).result(binding) env.each_line do |line| key, value = line.split("=", 2) ENV[key] = value end end