Skip to content

Instantly share code, notes, and snippets.

@jtushman
Created July 19, 2011 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtushman/1092811 to your computer and use it in GitHub Desktop.
Save jtushman/1092811 to your computer and use it in GitHub Desktop.
tweaking load_env to use 'syck'
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