Created
July 19, 2011 15:37
-
-
Save jtushman/1092811 to your computer and use it in GitHub Desktop.
tweaking load_env to use 'syck'
This file contains hidden or 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
def load_env(rubber_only=true) | |
env = ENV["RUBBER_ENV"] ||= "development" | |
root = File.expand_path('../..', __FILE__) | |
rails_env_file = File.join(root, 'config', 'environment.rb') | |
if ! rubber_only && File.exists?(rails_env_file) | |
require(rails_env_file) | |
else | |
require 'yaml' | |
YAML::ENGINE.yamler= 'syck' | |
require "bundler/setup" if File.exist?(File.join(root, "Gemfile")) | |
require "rubber" | |
Rubber::initialize(root, env) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment