Last active
December 21, 2015 04:18
-
-
Save danielpuglisi/56d4d3c7e2b90257799d to your computer and use it in GitHub Desktop.
Rails ENV variables: heroku development setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# other stuff | |
config/env.rb | |
# other stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username = ENV["USERNAME"] | |
password = ENV["PASSWORD"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV["USERNAME"] = "peter" | |
ENV["PASSWORD"] = "enis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the rails application | |
require File.expand_path('../application', __FILE__) | |
# Load heroku vars from local file | |
heroku_env = File.join(Rails.root, 'config', 'env.rb') | |
load(heroku_env) if File.exists?(heroku_env) | |
# Initialize the rails application | |
YourAppName::Application.initialize! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment