From 185cdb2a14dd403b3a8e9f4f302f972d33a8b774 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 22 Jan 2016 15:30:13 +0100 Subject: [PATCH] Rails root poject path added to command --- back-office/app/controllers/items_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/back-office/app/controllers/items_controller.rb b/back-office/app/controllers/items_controller.rb index 096f0f2..1398781 100644 --- a/back-office/app/controllers/items_controller.rb +++ b/back-office/app/controllers/items_controller.rb @@ -69,15 +69,15 @@ class ItemsController < ApplicationController case @task when 'validate_items' - @output = ItemsHelper::execute_command("rake ribica:validate_items") + @output = ItemsHelper::execute_command("rake ribica:validate_items -f #{Rails.root}/Rakefile") @output.collect{|x| x.sub! "\n", "" } when 'import_items' - @output = ItemsHelper::execute_command("rake ribica:import_items") + @output = ItemsHelper::execute_command("rake ribica:import_items -f #{Rails.root}/Rakefile") @output.collect{|x| x.sub! "\n", "" } - ItemsHelper::execute_command("rake ribica:reindex") unless RakeTasksHelper::is_error_occurred + ItemsHelper::execute_command("rake ribica:reindex -f #{Rails.root}/Rakefile") unless RakeTasksHelper::is_error_occurred @output when 'update_prices' - @output = ItemsHelper::execute_command("rake ribica:update_prices") - ItemsHelper::execute_command("rake ribica:reindex") + @output = ItemsHelper::execute_command("rake ribica:update_prices -f #{Rails.root}/Rakefile") + ItemsHelper::execute_command("rake ribica:reindex -f #{Rails.root}/Rakefile") unless RakeTasksHelper::is_error_occurred @output else @error_message = "There is no such task" end