From 4d2a7afd38ba7aeb47b1310e1252df0ea9f18a0d Mon Sep 17 00:00:00 2001 From: Parziphal Date: Sun, 27 Oct 2013 00:51:15 -0500 Subject: [PATCH] helping CompileAssets to work --- install/ApplicationInstaller/CompileAssets.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install/ApplicationInstaller/CompileAssets.php b/install/ApplicationInstaller/CompileAssets.php index dec5a48..3c5b228 100755 --- a/install/ApplicationInstaller/CompileAssets.php +++ b/install/ApplicationInstaller/CompileAssets.php @@ -9,7 +9,17 @@ class CompileAssets { static public function compile() { - require __DIR__ . '/../../config/boot.php'; + $railsRoot = __DIR__ . '/../..'; + + # Create temporary config/config.php file + $file = $railsRoot . '/config/config.php.example'; + $target = $railsRoot . '/config/config.php'; + copy($file, $target); + + require $railsRoot . '/config/boot.php'; \Rails::assets()->compileAll(); + + # Delete temporary config file. + unlink($target); } }