From e329b100f3a7c0bd566a0a78e3396ed044925d12 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 18 Nov 2011 10:05:59 -0500 Subject: [PATCH] scope the Rails reference so Guard::Rails is not used instead of actual Rails --- lib/guard/rails-assets/rails_runner.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/guard/rails-assets/rails_runner.rb b/lib/guard/rails-assets/rails_runner.rb index 235682e..06a9daf 100644 --- a/lib/guard/rails-assets/rails_runner.rb +++ b/lib/guard/rails-assets/rails_runner.rb @@ -40,12 +40,12 @@ module Guard Rake::Task["tmp:cache:clear"].execute # copy from the "assets:clean" Rake task config = ::Rails.application.config - public_asset_path = File.join(Rails.public_path, config.assets.prefix) + public_asset_path = File.join(::Rails.public_path, config.assets.prefix) rm_rf public_asset_path, :secure => true end def precompile - config = Rails.application.config + config = ::Rails.application.config unless config.assets.enabled warn "Cannot precompile assets if sprockets is disabled. Enabling it." config.assets.enabled = true @@ -61,8 +61,8 @@ module Guard config.assets.digest = digest config.assets.digests = {} - env = Rails.application.assets - target = File.join(Rails.public_path, config.assets.prefix) + env = ::Rails.application.assets + target = File.join(::Rails.public_path, config.assets.prefix) compiler = Sprockets::StaticCompiler.new(env, target, config.assets.precompile,