From 1578b0a3d1c55e040cba53747430d14cad3daf14 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Sun, 13 Oct 2019 17:32:11 +0200 Subject: [PATCH] F #2799: install_gems warns if gems are packaged (#3831) --- share/install_gems/install_gems | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/share/install_gems/install_gems b/share/install_gems/install_gems index 2005aa1c11..9023309137 100755 --- a/share/install_gems/install_gems +++ b/share/install_gems/install_gems @@ -438,6 +438,24 @@ def install_bundler_gem end def install_gems(packages, bundler = false) + gems_location = '/usr/share/one/gems' + if File.directory?(gems_location) + STDERR.puts(<<-EOT.unindent(12)) + WARNING: Running install_gems is not necessary anymore, as all the + required dependencies are already installed by your packaging + system into symlinked location #{gems_location}. Ruby gems + installed by this script won't be used until this symlink exists. + Remove the symlink before starting the OpenNebula services + to use Ruby gems installed by this script. E.g. execute + + # unlink #{gems_location} + + Execution continues in 15 seconds ... +EOT + + sleep(15) + end + if bundler gems_list=which_gems(packages) else