Insert these lines of code to the config/application.rb after line
config.assets.version = '1.0'
:
config.before_configuration do
env_file = File.join(Rails.root, 'config', 'paypal.yml')
YAML.load(File.open(env_file)) .each do |key, value|
ENV[key.to_s] = value
end if File.exists?(env_file)
end