From d064ee6db3da77b17773f0e9a359e7dada3606a4 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 22 Apr 2020 10:21:08 +0200 Subject: [PATCH] B #4304: Distribution gems affects OpenNebula (#4578) Remove vendor_ruby and site_ruby directories from $LOAD_PATH, so that distribution gems installed directly into loadable path without need to use rubygems are not loaded by require. --- share/hooks/alias_ip/alias_ip.rb | 1 + share/hooks/ft/host_error.rb | 1 + share/hooks/vcenter/create_vcenter_net.rb | 1 + share/hooks/vcenter/delete_vcenter_net.rb | 1 + src/authm_mad/one_auth_mad.rb | 1 + src/authm_mad/remotes/dummy/authenticate | 1 + src/authm_mad/remotes/ldap/authenticate | 1 + src/authm_mad/remotes/plain/authenticate | 1 + src/authm_mad/remotes/server_cipher/authenticate | 1 + src/authm_mad/remotes/server_x509/authenticate | 1 + src/authm_mad/remotes/ssh/authenticate | 1 + src/authm_mad/remotes/x509/authenticate | 1 + src/cli/oneacct | 1 + src/cli/oneacl | 1 + src/cli/onecluster | 1 + src/cli/onedatastore | 1 + src/cli/oneflow | 1 + src/cli/oneflow-template | 1 + src/cli/onegroup | 1 + src/cli/onehook | 1 + src/cli/onehost | 1 + src/cli/oneimage | 1 + src/cli/onemarket | 1 + src/cli/onemarketapp | 1 + src/cli/oneprovision | 1 + src/cli/onesecgroup | 1 + src/cli/oneshowback | 1 + src/cli/onetemplate | 1 + src/cli/oneuser | 1 + src/cli/onevcenter | 1 + src/cli/onevdc | 1 + src/cli/onevm | 1 + src/cli/onevmgroup | 1 + src/cli/onevnet | 1 + src/cli/onevntemplate | 1 + src/cli/onevrouter | 1 + src/cli/onezone | 1 + src/cloud/ec2/bin/econe-allocate-address | 1 + src/cloud/ec2/bin/econe-associate-address | 1 + src/cloud/ec2/bin/econe-attach-volume | 1 + src/cloud/ec2/bin/econe-create-keypair | 1 + src/cloud/ec2/bin/econe-create-volume | 1 + src/cloud/ec2/bin/econe-delete-keypair | 1 + src/cloud/ec2/bin/econe-delete-volume | 1 + src/cloud/ec2/bin/econe-describe-addresses | 1 + src/cloud/ec2/bin/econe-describe-images | 1 + src/cloud/ec2/bin/econe-describe-instances | 1 + src/cloud/ec2/bin/econe-describe-keypairs | 1 + src/cloud/ec2/bin/econe-describe-volumes | 1 + src/cloud/ec2/bin/econe-detach-volume | 1 + src/cloud/ec2/bin/econe-disassociate-address | 1 + src/cloud/ec2/bin/econe-reboot-instances | 1 + src/cloud/ec2/bin/econe-register | 1 + src/cloud/ec2/bin/econe-release-address | 1 + src/cloud/ec2/bin/econe-run-instances | 1 + src/cloud/ec2/bin/econe-start-instances | 1 + src/cloud/ec2/bin/econe-stop-instances | 1 + src/cloud/ec2/bin/econe-terminate-instances | 1 + src/cloud/ec2/bin/econe-upload | 1 + src/cloud/ec2/lib/econe-server.rb | 1 + src/datastore_mad/one_datastore.rb | 1 + src/datastore_mad/remotes/vcenter/clone | 5 ++++- src/datastore_mad/remotes/vcenter/cp | 5 ++++- src/datastore_mad/remotes/vcenter/export | 5 ++++- src/datastore_mad/remotes/vcenter/mkfs | 5 ++++- src/datastore_mad/remotes/vcenter/monitor | 5 ++++- src/datastore_mad/remotes/vcenter/rm | 5 ++++- src/datastore_mad/remotes/vcenter/stat | 5 ++++- src/datastore_mad/remotes/vcenter_downloader.rb | 1 + src/datastore_mad/remotes/vcenter_uploader.rb | 1 + src/flow/oneflow-server.rb | 1 + src/hem/onehem-server.rb | 1 + src/hm_mad/one_hm.rb | 1 + src/im_mad/im_exec/one_im_exec.rb | 1 + .../remotes/az-probes.d/host/monitor/probe_host_monitor.rb | 1 + .../remotes/az-probes.d/host/system/probe_host_system.rb | 1 + .../remotes/az-probes.d/vm/monitor/probe_vm_monitor.rb | 1 + src/im_mad/remotes/az-probes.d/vm/status/probe_vm_status.rb | 1 + src/im_mad/remotes/dummy-probes.d/vm/monitor/monitor.rb | 1 + .../remotes/ec2-probes.d/host/monitor/probe_host_monitor.rb | 1 + .../remotes/ec2-probes.d/host/system/probe_host_system.rb | 1 + .../remotes/ec2-probes.d/vm/monitor/probe_vm_monitor.rb | 1 + src/im_mad/remotes/ec2-probes.d/vm/status/probe_vm_status.rb | 1 + src/im_mad/remotes/lib/nsx.rb | 1 + src/im_mad/remotes/lib/probe_db.rb | 1 + src/im_mad/remotes/lib/vcenter.rb | 1 + .../remotes/one-probes.d/host/monitor/probe_host_monitor.rb | 1 + .../remotes/one-probes.d/host/system/probe_host_system.rb | 1 + .../remotes/one-probes.d/vm/monitor/probe_vm_monitor.rb | 1 + src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb | 1 + .../packet-probes.d/host/monitor/probe_host_monitor.rb | 1 + .../remotes/packet-probes.d/host/system/probe_host_system.rb | 1 + .../remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb | 1 + .../remotes/packet-probes.d/vm/status/probe_vm_status.rb | 1 + src/im_mad/remotes/vcenter-probes.d/host/system/nsx.rb | 1 + src/ipamm_mad/one_ipam.rb | 1 + src/ipamm_mad/remotes/packet/allocate_address | 1 + src/ipamm_mad/remotes/packet/free_address | 1 + src/ipamm_mad/remotes/packet/get_address | 1 + src/ipamm_mad/remotes/packet/register_address_range | 1 + src/ipamm_mad/remotes/packet/unregister_address_range | 1 + src/market_mad/one_market.rb | 1 + src/market_mad/remotes/s3/delete | 1 + src/market_mad/remotes/s3/import | 1 + src/market_mad/remotes/s3/monitor | 1 + src/market_mad/remotes/turnkeylinux/monitor | 1 + src/onedb/onedb | 1 + src/onedb/vcenter_one54_pre.rb | 1 + src/onegate/onegate-server.rb | 1 + src/pm_mad/remotes/dummy/deploy | 1 + src/pm_mad/remotes/ec2/cancel | 1 + src/pm_mad/remotes/ec2/deploy | 1 + src/pm_mad/remotes/ec2/poll | 1 + src/pm_mad/remotes/ec2/reboot | 1 + src/pm_mad/remotes/ec2/reset | 1 + src/pm_mad/remotes/ec2/shutdown | 1 + src/pm_mad/remotes/packet/cancel | 1 + src/pm_mad/remotes/packet/deploy | 1 + src/pm_mad/remotes/packet/poll | 1 + src/pm_mad/remotes/packet/reboot | 1 + src/pm_mad/remotes/packet/reset | 1 + src/pm_mad/remotes/packet/shutdown | 1 + src/sunstone/bin/novnc-server | 1 + src/sunstone/routes/nsx.rb | 1 + src/sunstone/sunstone-server.rb | 1 + src/tm_mad/one_tm.rb | 1 + src/tm_mad/vcenter/clone | 5 ++++- src/tm_mad/vcenter/cpds | 5 ++++- src/tm_mad/vcenter/delete | 5 ++++- src/tm_mad/vcenter/mkimage | 5 ++++- src/tm_mad/vcenter/mv | 5 ++++- src/tm_mad/vcenter/mvds | 5 ++++- src/tm_mad/vcenter/resize | 5 ++++- src/vmm_mad/dummy/one_vmm_dummy.rb | 1 + src/vmm_mad/exec/one_vmm_exec.rb | 1 + src/vmm_mad/remotes/az/az_driver.rb | 1 + src/vmm_mad/remotes/az/cancel | 1 + src/vmm_mad/remotes/az/deploy | 1 + src/vmm_mad/remotes/az/poll | 1 + src/vmm_mad/remotes/az/reboot | 1 + src/vmm_mad/remotes/az/restore | 1 + src/vmm_mad/remotes/az/shutdown | 1 + src/vmm_mad/remotes/ec2/cancel | 1 + src/vmm_mad/remotes/ec2/deploy | 1 + src/vmm_mad/remotes/ec2/ec2_driver.rb | 1 + src/vmm_mad/remotes/ec2/poll | 1 + src/vmm_mad/remotes/ec2/reboot | 1 + src/vmm_mad/remotes/ec2/restore | 1 + src/vmm_mad/remotes/ec2/shutdown | 1 + src/vmm_mad/remotes/lib/nsx_driver/nsx_client.rb | 1 + src/vmm_mad/remotes/lib/nsx_driver/nsx_constants.rb | 1 + src/vmm_mad/remotes/lib/nsx_driver/nsxt_client.rb | 1 + src/vmm_mad/remotes/lib/nsx_driver/nsxv_client.rb | 1 + src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb | 1 + src/vmm_mad/remotes/nsx/nsx_driver.rb | 1 + src/vmm_mad/remotes/one/cancel | 1 + src/vmm_mad/remotes/one/deploy | 1 + src/vmm_mad/remotes/one/opennebula_driver.rb | 1 + src/vmm_mad/remotes/one/poll | 1 + src/vmm_mad/remotes/one/reboot | 1 + src/vmm_mad/remotes/one/reset | 1 + src/vmm_mad/remotes/one/restore | 1 + src/vmm_mad/remotes/one/save | 1 + src/vmm_mad/remotes/one/shutdown | 1 + src/vmm_mad/remotes/packet/cancel | 1 + src/vmm_mad/remotes/packet/deploy | 1 + src/vmm_mad/remotes/packet/packet_driver.rb | 1 + src/vmm_mad/remotes/packet/poll | 1 + src/vmm_mad/remotes/packet/reboot | 1 + src/vmm_mad/remotes/packet/reset | 1 + src/vmm_mad/remotes/packet/shutdown | 1 + src/vmm_mad/remotes/vcenter/attach_disk | 5 ++++- src/vmm_mad/remotes/vcenter/attach_nic | 5 ++++- src/vmm_mad/remotes/vcenter/cancel | 5 ++++- src/vmm_mad/remotes/vcenter/deploy | 5 ++++- src/vmm_mad/remotes/vcenter/detach_nic | 5 ++++- src/vmm_mad/remotes/vcenter/migrate | 5 ++++- src/vmm_mad/remotes/vcenter/poll | 5 ++++- src/vmm_mad/remotes/vcenter/reboot | 5 ++++- src/vmm_mad/remotes/vcenter/reconfigure | 5 ++++- src/vmm_mad/remotes/vcenter/reset | 5 ++++- src/vmm_mad/remotes/vcenter/restore | 5 ++++- src/vmm_mad/remotes/vcenter/save | 5 ++++- src/vmm_mad/remotes/vcenter/shutdown | 5 ++++- src/vmm_mad/remotes/vcenter/snapshot_create | 5 ++++- src/vmm_mad/remotes/vcenter/snapshot_delete | 5 ++++- src/vmm_mad/remotes/vcenter/snapshot_revert | 5 ++++- src/vmm_mad/remotes/vcenter/vcenter_driver.rb | 1 + 188 files changed, 278 insertions(+), 30 deletions(-) diff --git a/share/hooks/alias_ip/alias_ip.rb b/share/hooks/alias_ip/alias_ip.rb index a39141ab91..4911dfa55c 100755 --- a/share/hooks/alias_ip/alias_ip.rb +++ b/share/hooks/alias_ip/alias_ip.rb @@ -32,6 +32,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/share/hooks/ft/host_error.rb b/share/hooks/ft/host_error.rb index cc49227782..54fe5e11af 100755 --- a/share/hooks/ft/host_error.rb +++ b/share/hooks/ft/host_error.rb @@ -51,6 +51,7 @@ FENCE_HOST = File.dirname(__FILE__) + '/fence_host.sh' if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/share/hooks/vcenter/create_vcenter_net.rb b/share/hooks/vcenter/create_vcenter_net.rb index 18e3998073..907ecc4a96 100755 --- a/share/hooks/vcenter/create_vcenter_net.rb +++ b/share/hooks/vcenter/create_vcenter_net.rb @@ -33,6 +33,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/share/hooks/vcenter/delete_vcenter_net.rb b/share/hooks/vcenter/delete_vcenter_net.rb index c8b62e27b7..a59381a960 100755 --- a/share/hooks/vcenter/delete_vcenter_net.rb +++ b/share/hooks/vcenter/delete_vcenter_net.rb @@ -32,6 +32,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/one_auth_mad.rb b/src/authm_mad/one_auth_mad.rb index f40d9f2877..7b362e6f42 100755 --- a/src/authm_mad/one_auth_mad.rb +++ b/src/authm_mad/one_auth_mad.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/dummy/authenticate b/src/authm_mad/remotes/dummy/authenticate index 16f9a6a70d..384616f4e9 100755 --- a/src/authm_mad/remotes/dummy/authenticate +++ b/src/authm_mad/remotes/dummy/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/ldap/authenticate b/src/authm_mad/remotes/ldap/authenticate index 6f5a9c2152..152fd6bddb 100755 --- a/src/authm_mad/remotes/ldap/authenticate +++ b/src/authm_mad/remotes/ldap/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/plain/authenticate b/src/authm_mad/remotes/plain/authenticate index be21ef0b73..5e9bb67a6a 100755 --- a/src/authm_mad/remotes/plain/authenticate +++ b/src/authm_mad/remotes/plain/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/server_cipher/authenticate b/src/authm_mad/remotes/server_cipher/authenticate index 0f03ad30ef..a4656fd337 100755 --- a/src/authm_mad/remotes/server_cipher/authenticate +++ b/src/authm_mad/remotes/server_cipher/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/server_x509/authenticate b/src/authm_mad/remotes/server_x509/authenticate index b9e499d54c..3181d79dd9 100755 --- a/src/authm_mad/remotes/server_x509/authenticate +++ b/src/authm_mad/remotes/server_x509/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/ssh/authenticate b/src/authm_mad/remotes/ssh/authenticate index e028e5f4f7..a540492bc3 100755 --- a/src/authm_mad/remotes/ssh/authenticate +++ b/src/authm_mad/remotes/ssh/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/authm_mad/remotes/x509/authenticate b/src/authm_mad/remotes/x509/authenticate index b6b070cd52..d0af44ab3f 100755 --- a/src/authm_mad/remotes/x509/authenticate +++ b/src/authm_mad/remotes/x509/authenticate @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneacct b/src/cli/oneacct index 7e758b30ed..a4d29f4efb 100755 --- a/src/cli/oneacct +++ b/src/cli/oneacct @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneacl b/src/cli/oneacl index 912b37463a..416d55c951 100755 --- a/src/cli/oneacl +++ b/src/cli/oneacl @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onecluster b/src/cli/onecluster index 2604311a14..67b47aa11b 100755 --- a/src/cli/onecluster +++ b/src/cli/onecluster @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onedatastore b/src/cli/onedatastore index 7f0af3130b..84e8c11a75 100755 --- a/src/cli/onedatastore +++ b/src/cli/onedatastore @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneflow b/src/cli/oneflow index c7a345c7f6..21a8b34c9a 100755 --- a/src/cli/oneflow +++ b/src/cli/oneflow @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneflow-template b/src/cli/oneflow-template index c88fa8c270..8afbad2254 100755 --- a/src/cli/oneflow-template +++ b/src/cli/oneflow-template @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onegroup b/src/cli/onegroup index 1a1ba0d0a6..8772d73fcd 100755 --- a/src/cli/onegroup +++ b/src/cli/onegroup @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onehook b/src/cli/onehook index c2890fa8fe..0d1cdf8dba 100755 --- a/src/cli/onehook +++ b/src/cli/onehook @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onehost b/src/cli/onehost index 616813a300..4e6c3033e4 100755 --- a/src/cli/onehost +++ b/src/cli/onehost @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneimage b/src/cli/oneimage index d828181fbb..74bb2f830a 100755 --- a/src/cli/oneimage +++ b/src/cli/oneimage @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onemarket b/src/cli/onemarket index d595fed313..2702fc6561 100755 --- a/src/cli/onemarket +++ b/src/cli/onemarket @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onemarketapp b/src/cli/onemarketapp index 4b335ea4c2..a9fece9fe9 100755 --- a/src/cli/onemarketapp +++ b/src/cli/onemarketapp @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneprovision b/src/cli/oneprovision index 6dd575a799..45945e326f 100755 --- a/src/cli/oneprovision +++ b/src/cli/oneprovision @@ -34,6 +34,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onesecgroup b/src/cli/onesecgroup index b942e6a4f8..b68269c0e3 100755 --- a/src/cli/onesecgroup +++ b/src/cli/onesecgroup @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneshowback b/src/cli/oneshowback index c06acc8df9..69cfaaac75 100755 --- a/src/cli/oneshowback +++ b/src/cli/oneshowback @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onetemplate b/src/cli/onetemplate index a3c4602bba..09424b9f1c 100755 --- a/src/cli/onetemplate +++ b/src/cli/onetemplate @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/oneuser b/src/cli/oneuser index a9134ef6d3..aa3c43170d 100755 --- a/src/cli/oneuser +++ b/src/cli/oneuser @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevcenter b/src/cli/onevcenter index bd9e215d0a..2db9bfc3c1 100755 --- a/src/cli/onevcenter +++ b/src/cli/onevcenter @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevdc b/src/cli/onevdc index 071d11e31b..0b87bd175a 100755 --- a/src/cli/onevdc +++ b/src/cli/onevdc @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevm b/src/cli/onevm index 1d0d37f1db..475c2c30d5 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevmgroup b/src/cli/onevmgroup index 9ce7c5b100..ee2b6a7016 100755 --- a/src/cli/onevmgroup +++ b/src/cli/onevmgroup @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevnet b/src/cli/onevnet index 38e35ee2d9..4b0cacf09a 100755 --- a/src/cli/onevnet +++ b/src/cli/onevnet @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevntemplate b/src/cli/onevntemplate index c6a8c402f5..a37115826c 100755 --- a/src/cli/onevntemplate +++ b/src/cli/onevntemplate @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onevrouter b/src/cli/onevrouter index fb8a624dc6..bfb8d38831 100755 --- a/src/cli/onevrouter +++ b/src/cli/onevrouter @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cli/onezone b/src/cli/onezone index cc662a8496..5a883e77d7 100755 --- a/src/cli/onezone +++ b/src/cli/onezone @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-allocate-address b/src/cloud/ec2/bin/econe-allocate-address index 71110b1714..a04c793541 100755 --- a/src/cloud/ec2/bin/econe-allocate-address +++ b/src/cloud/ec2/bin/econe-allocate-address @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-associate-address b/src/cloud/ec2/bin/econe-associate-address index eaf896c410..7fa9aa5d77 100755 --- a/src/cloud/ec2/bin/econe-associate-address +++ b/src/cloud/ec2/bin/econe-associate-address @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-attach-volume b/src/cloud/ec2/bin/econe-attach-volume index cb225c19f5..39fcb09583 100755 --- a/src/cloud/ec2/bin/econe-attach-volume +++ b/src/cloud/ec2/bin/econe-attach-volume @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-create-keypair b/src/cloud/ec2/bin/econe-create-keypair index 9e50498686..8c482f1110 100755 --- a/src/cloud/ec2/bin/econe-create-keypair +++ b/src/cloud/ec2/bin/econe-create-keypair @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-create-volume b/src/cloud/ec2/bin/econe-create-volume index 0c44f65160..efb205e413 100755 --- a/src/cloud/ec2/bin/econe-create-volume +++ b/src/cloud/ec2/bin/econe-create-volume @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-delete-keypair b/src/cloud/ec2/bin/econe-delete-keypair index 323f7c8fe8..567980bff5 100755 --- a/src/cloud/ec2/bin/econe-delete-keypair +++ b/src/cloud/ec2/bin/econe-delete-keypair @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-delete-volume b/src/cloud/ec2/bin/econe-delete-volume index 753c3f5955..df12f990b2 100755 --- a/src/cloud/ec2/bin/econe-delete-volume +++ b/src/cloud/ec2/bin/econe-delete-volume @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-describe-addresses b/src/cloud/ec2/bin/econe-describe-addresses index 8a1ff5bb67..2516806d6e 100755 --- a/src/cloud/ec2/bin/econe-describe-addresses +++ b/src/cloud/ec2/bin/econe-describe-addresses @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-describe-images b/src/cloud/ec2/bin/econe-describe-images index ca864ca2ba..412a9e8cd5 100755 --- a/src/cloud/ec2/bin/econe-describe-images +++ b/src/cloud/ec2/bin/econe-describe-images @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-describe-instances b/src/cloud/ec2/bin/econe-describe-instances index b59d6336a8..e7da52d957 100755 --- a/src/cloud/ec2/bin/econe-describe-instances +++ b/src/cloud/ec2/bin/econe-describe-instances @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-describe-keypairs b/src/cloud/ec2/bin/econe-describe-keypairs index 2942498059..999c89967a 100755 --- a/src/cloud/ec2/bin/econe-describe-keypairs +++ b/src/cloud/ec2/bin/econe-describe-keypairs @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-describe-volumes b/src/cloud/ec2/bin/econe-describe-volumes index 9e0464934e..8b35f72d83 100755 --- a/src/cloud/ec2/bin/econe-describe-volumes +++ b/src/cloud/ec2/bin/econe-describe-volumes @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-detach-volume b/src/cloud/ec2/bin/econe-detach-volume index cfbd9ffdf9..ed3fc9f9b6 100755 --- a/src/cloud/ec2/bin/econe-detach-volume +++ b/src/cloud/ec2/bin/econe-detach-volume @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-disassociate-address b/src/cloud/ec2/bin/econe-disassociate-address index b70271ee2b..0148fccedb 100755 --- a/src/cloud/ec2/bin/econe-disassociate-address +++ b/src/cloud/ec2/bin/econe-disassociate-address @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-reboot-instances b/src/cloud/ec2/bin/econe-reboot-instances index 4be297f69b..48db0c8823 100755 --- a/src/cloud/ec2/bin/econe-reboot-instances +++ b/src/cloud/ec2/bin/econe-reboot-instances @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-register b/src/cloud/ec2/bin/econe-register index 3b04947b92..3325f9d0f6 100755 --- a/src/cloud/ec2/bin/econe-register +++ b/src/cloud/ec2/bin/econe-register @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-release-address b/src/cloud/ec2/bin/econe-release-address index 597f05c789..f9cbd3fad4 100755 --- a/src/cloud/ec2/bin/econe-release-address +++ b/src/cloud/ec2/bin/econe-release-address @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-run-instances b/src/cloud/ec2/bin/econe-run-instances index 9f5a65f4f8..661f3d3345 100755 --- a/src/cloud/ec2/bin/econe-run-instances +++ b/src/cloud/ec2/bin/econe-run-instances @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-start-instances b/src/cloud/ec2/bin/econe-start-instances index f4d303c6f7..28e5ed8a95 100755 --- a/src/cloud/ec2/bin/econe-start-instances +++ b/src/cloud/ec2/bin/econe-start-instances @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-stop-instances b/src/cloud/ec2/bin/econe-stop-instances index a7e55f6573..cb2fc8dddb 100755 --- a/src/cloud/ec2/bin/econe-stop-instances +++ b/src/cloud/ec2/bin/econe-stop-instances @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-terminate-instances b/src/cloud/ec2/bin/econe-terminate-instances index e9167bb429..d8e85bfbbb 100755 --- a/src/cloud/ec2/bin/econe-terminate-instances +++ b/src/cloud/ec2/bin/econe-terminate-instances @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/bin/econe-upload b/src/cloud/ec2/bin/econe-upload index 850490d9f4..d150bf09fc 100755 --- a/src/cloud/ec2/bin/econe-upload +++ b/src/cloud/ec2/bin/econe-upload @@ -27,6 +27,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/cloud/ec2/lib/econe-server.rb b/src/cloud/ec2/lib/econe-server.rb index 9d01ee5b3f..f25590641b 100644 --- a/src/cloud/ec2/lib/econe-server.rb +++ b/src/cloud/ec2/lib/econe-server.rb @@ -42,6 +42,7 @@ VIEWS_LOCATION = RUBY_LIB_LOCATION + '/cloud/econe/views' if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/datastore_mad/one_datastore.rb b/src/datastore_mad/one_datastore.rb index 7f57275d0f..fd8a7bb876 100755 --- a/src/datastore_mad/one_datastore.rb +++ b/src/datastore_mad/one_datastore.rb @@ -33,6 +33,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/datastore_mad/remotes/vcenter/clone b/src/datastore_mad/remotes/vcenter/clone index 7c43717ec5..363cae5ca0 100755 --- a/src/datastore_mad/remotes/vcenter/clone +++ b/src/datastore_mad/remotes/vcenter/clone @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter/cp b/src/datastore_mad/remotes/vcenter/cp index 640ab332d0..7e8bc6d530 100755 --- a/src/datastore_mad/remotes/vcenter/cp +++ b/src/datastore_mad/remotes/vcenter/cp @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter/export b/src/datastore_mad/remotes/vcenter/export index d822f3b0d4..c83b864245 100755 --- a/src/datastore_mad/remotes/vcenter/export +++ b/src/datastore_mad/remotes/vcenter/export @@ -30,7 +30,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter/mkfs b/src/datastore_mad/remotes/vcenter/mkfs index 9776ae479c..1ca4f10c4e 100755 --- a/src/datastore_mad/remotes/vcenter/mkfs +++ b/src/datastore_mad/remotes/vcenter/mkfs @@ -30,7 +30,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter/monitor b/src/datastore_mad/remotes/vcenter/monitor index 1bfdaba45d..76594a26ec 100755 --- a/src/datastore_mad/remotes/vcenter/monitor +++ b/src/datastore_mad/remotes/vcenter/monitor @@ -30,7 +30,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter/rm b/src/datastore_mad/remotes/vcenter/rm index 2effbc57bc..d4c6b918ea 100755 --- a/src/datastore_mad/remotes/vcenter/rm +++ b/src/datastore_mad/remotes/vcenter/rm @@ -30,7 +30,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter/stat b/src/datastore_mad/remotes/vcenter/stat index 02518dc932..b6cbc08a37 100755 --- a/src/datastore_mad/remotes/vcenter/stat +++ b/src/datastore_mad/remotes/vcenter/stat @@ -30,7 +30,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/datastore_mad/remotes/vcenter_downloader.rb b/src/datastore_mad/remotes/vcenter_downloader.rb index ab0c55bd85..8eb69d3916 100755 --- a/src/datastore_mad/remotes/vcenter_downloader.rb +++ b/src/datastore_mad/remotes/vcenter_downloader.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/datastore_mad/remotes/vcenter_uploader.rb b/src/datastore_mad/remotes/vcenter_uploader.rb index 1f17fb1809..0c644e8998 100755 --- a/src/datastore_mad/remotes/vcenter_uploader.rb +++ b/src/datastore_mad/remotes/vcenter_uploader.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/flow/oneflow-server.rb b/src/flow/oneflow-server.rb index 523920faf6..fe2f2d2197 100644 --- a/src/flow/oneflow-server.rb +++ b/src/flow/oneflow-server.rb @@ -39,6 +39,7 @@ CONFIGURATION_FILE = ETC_LOCATION + '/oneflow-server.conf' if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/hem/onehem-server.rb b/src/hem/onehem-server.rb index 6c7de27b2e..ab532e3be2 100755 --- a/src/hem/onehem-server.rb +++ b/src/hem/onehem-server.rb @@ -40,6 +40,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/hm_mad/one_hm.rb b/src/hm_mad/one_hm.rb index 096b3ad5fb..ef8a66b2ad 100755 --- a/src/hm_mad/one_hm.rb +++ b/src/hm_mad/one_hm.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/im_exec/one_im_exec.rb b/src/im_mad/im_exec/one_im_exec.rb index d63771ee83..1f9fd1b43a 100755 --- a/src/im_mad/im_exec/one_im_exec.rb +++ b/src/im_mad/im_exec/one_im_exec.rb @@ -32,6 +32,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/az-probes.d/host/monitor/probe_host_monitor.rb b/src/im_mad/remotes/az-probes.d/host/monitor/probe_host_monitor.rb index 03129062d4..6b19946d58 100755 --- a/src/im_mad/remotes/az-probes.d/host/monitor/probe_host_monitor.rb +++ b/src/im_mad/remotes/az-probes.d/host/monitor/probe_host_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/az-probes.d/host/system/probe_host_system.rb b/src/im_mad/remotes/az-probes.d/host/system/probe_host_system.rb index 4f8352492d..df01995fc6 100755 --- a/src/im_mad/remotes/az-probes.d/host/system/probe_host_system.rb +++ b/src/im_mad/remotes/az-probes.d/host/system/probe_host_system.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/az-probes.d/vm/monitor/probe_vm_monitor.rb b/src/im_mad/remotes/az-probes.d/vm/monitor/probe_vm_monitor.rb index 404626ac89..bd0c0ef219 100755 --- a/src/im_mad/remotes/az-probes.d/vm/monitor/probe_vm_monitor.rb +++ b/src/im_mad/remotes/az-probes.d/vm/monitor/probe_vm_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/az-probes.d/vm/status/probe_vm_status.rb b/src/im_mad/remotes/az-probes.d/vm/status/probe_vm_status.rb index cab91a4ecc..e02e896eaa 100755 --- a/src/im_mad/remotes/az-probes.d/vm/status/probe_vm_status.rb +++ b/src/im_mad/remotes/az-probes.d/vm/status/probe_vm_status.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/dummy-probes.d/vm/monitor/monitor.rb b/src/im_mad/remotes/dummy-probes.d/vm/monitor/monitor.rb index 74a331d4de..d7be0e8301 100755 --- a/src/im_mad/remotes/dummy-probes.d/vm/monitor/monitor.rb +++ b/src/im_mad/remotes/dummy-probes.d/vm/monitor/monitor.rb @@ -29,6 +29,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/ec2-probes.d/host/monitor/probe_host_monitor.rb b/src/im_mad/remotes/ec2-probes.d/host/monitor/probe_host_monitor.rb index 15869c1e44..758596a3fb 100755 --- a/src/im_mad/remotes/ec2-probes.d/host/monitor/probe_host_monitor.rb +++ b/src/im_mad/remotes/ec2-probes.d/host/monitor/probe_host_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/ec2-probes.d/host/system/probe_host_system.rb b/src/im_mad/remotes/ec2-probes.d/host/system/probe_host_system.rb index 67cc6c95d3..82357369a7 100755 --- a/src/im_mad/remotes/ec2-probes.d/host/system/probe_host_system.rb +++ b/src/im_mad/remotes/ec2-probes.d/host/system/probe_host_system.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/ec2-probes.d/vm/monitor/probe_vm_monitor.rb b/src/im_mad/remotes/ec2-probes.d/vm/monitor/probe_vm_monitor.rb index 33f90074f3..8c84e4fe66 100755 --- a/src/im_mad/remotes/ec2-probes.d/vm/monitor/probe_vm_monitor.rb +++ b/src/im_mad/remotes/ec2-probes.d/vm/monitor/probe_vm_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/ec2-probes.d/vm/status/probe_vm_status.rb b/src/im_mad/remotes/ec2-probes.d/vm/status/probe_vm_status.rb index ff5d2b63f5..813c107ca5 100755 --- a/src/im_mad/remotes/ec2-probes.d/vm/status/probe_vm_status.rb +++ b/src/im_mad/remotes/ec2-probes.d/vm/status/probe_vm_status.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/lib/nsx.rb b/src/im_mad/remotes/lib/nsx.rb index 2bbdd8c8d4..75eaa3da9b 100644 --- a/src/im_mad/remotes/lib/nsx.rb +++ b/src/im_mad/remotes/lib/nsx.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/lib/probe_db.rb b/src/im_mad/remotes/lib/probe_db.rb index 167911b5c0..147119f098 100644 --- a/src/im_mad/remotes/lib/probe_db.rb +++ b/src/im_mad/remotes/lib/probe_db.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/lib/vcenter.rb b/src/im_mad/remotes/lib/vcenter.rb index 0ee9adf8a7..a633b79b8c 100644 --- a/src/im_mad/remotes/lib/vcenter.rb +++ b/src/im_mad/remotes/lib/vcenter.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/one-probes.d/host/monitor/probe_host_monitor.rb b/src/im_mad/remotes/one-probes.d/host/monitor/probe_host_monitor.rb index 2b00bd5a07..8c0118ddb1 100755 --- a/src/im_mad/remotes/one-probes.d/host/monitor/probe_host_monitor.rb +++ b/src/im_mad/remotes/one-probes.d/host/monitor/probe_host_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/one-probes.d/host/system/probe_host_system.rb b/src/im_mad/remotes/one-probes.d/host/system/probe_host_system.rb index 9dbaf22c25..80d5bd35bc 100755 --- a/src/im_mad/remotes/one-probes.d/host/system/probe_host_system.rb +++ b/src/im_mad/remotes/one-probes.d/host/system/probe_host_system.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/one-probes.d/vm/monitor/probe_vm_monitor.rb b/src/im_mad/remotes/one-probes.d/vm/monitor/probe_vm_monitor.rb index fc3fbb1e10..0954612a16 100755 --- a/src/im_mad/remotes/one-probes.d/vm/monitor/probe_vm_monitor.rb +++ b/src/im_mad/remotes/one-probes.d/vm/monitor/probe_vm_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb b/src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb index bef127d081..9916154a80 100755 --- a/src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb +++ b/src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb b/src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb index 2ef74e5243..f12044694a 100755 --- a/src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb +++ b/src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb b/src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb index 8e77f868f4..883e374b7c 100755 --- a/src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb +++ b/src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb b/src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb index a1d27f2175..d8bb6b30f2 100755 --- a/src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb +++ b/src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb b/src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb index 74bc40e7ec..60de7751de 100755 --- a/src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb +++ b/src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/im_mad/remotes/vcenter-probes.d/host/system/nsx.rb b/src/im_mad/remotes/vcenter-probes.d/host/system/nsx.rb index 691bcf8452..e0979a404f 100755 --- a/src/im_mad/remotes/vcenter-probes.d/host/system/nsx.rb +++ b/src/im_mad/remotes/vcenter-probes.d/host/system/nsx.rb @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/ipamm_mad/one_ipam.rb b/src/ipamm_mad/one_ipam.rb index 57ad7a5b5c..7f00164d4a 100755 --- a/src/ipamm_mad/one_ipam.rb +++ b/src/ipamm_mad/one_ipam.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/ipamm_mad/remotes/packet/allocate_address b/src/ipamm_mad/remotes/packet/allocate_address index 3bf3c8b26d..13192e5f3c 100755 --- a/src/ipamm_mad/remotes/packet/allocate_address +++ b/src/ipamm_mad/remotes/packet/allocate_address @@ -54,6 +54,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << PACKET_LOCATION diff --git a/src/ipamm_mad/remotes/packet/free_address b/src/ipamm_mad/remotes/packet/free_address index 983fc9675a..72f426c70b 100755 --- a/src/ipamm_mad/remotes/packet/free_address +++ b/src/ipamm_mad/remotes/packet/free_address @@ -48,6 +48,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << PACKET_LOCATION diff --git a/src/ipamm_mad/remotes/packet/get_address b/src/ipamm_mad/remotes/packet/get_address index 3d8960a2aa..43b5cfc484 100755 --- a/src/ipamm_mad/remotes/packet/get_address +++ b/src/ipamm_mad/remotes/packet/get_address @@ -61,6 +61,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << PACKET_LOCATION diff --git a/src/ipamm_mad/remotes/packet/register_address_range b/src/ipamm_mad/remotes/packet/register_address_range index 835e79dd1b..d321d1ff98 100755 --- a/src/ipamm_mad/remotes/packet/register_address_range +++ b/src/ipamm_mad/remotes/packet/register_address_range @@ -82,6 +82,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << PACKET_LOCATION diff --git a/src/ipamm_mad/remotes/packet/unregister_address_range b/src/ipamm_mad/remotes/packet/unregister_address_range index 3be928010f..665fd646ce 100755 --- a/src/ipamm_mad/remotes/packet/unregister_address_range +++ b/src/ipamm_mad/remotes/packet/unregister_address_range @@ -46,6 +46,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << PACKET_LOCATION diff --git a/src/market_mad/one_market.rb b/src/market_mad/one_market.rb index 5b1d32c6d4..c0345a3fdc 100755 --- a/src/market_mad/one_market.rb +++ b/src/market_mad/one_market.rb @@ -33,6 +33,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/market_mad/remotes/s3/delete b/src/market_mad/remotes/s3/delete index 3288082847..707b17598b 100755 --- a/src/market_mad/remotes/s3/delete +++ b/src/market_mad/remotes/s3/delete @@ -36,6 +36,7 @@ UTILS_PATH = File.join(File.dirname(__FILE__), '../../datastore') if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/market_mad/remotes/s3/import b/src/market_mad/remotes/s3/import index cc5f426a4a..96a420252c 100755 --- a/src/market_mad/remotes/s3/import +++ b/src/market_mad/remotes/s3/import @@ -36,6 +36,7 @@ UTILS_PATH = File.join(File.dirname(__FILE__), '../../datastore') if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/market_mad/remotes/s3/monitor b/src/market_mad/remotes/s3/monitor index 925abba824..0857dda3bb 100755 --- a/src/market_mad/remotes/s3/monitor +++ b/src/market_mad/remotes/s3/monitor @@ -36,6 +36,7 @@ UTILS_PATH = File.join(File.dirname(__FILE__), '../../datastore') if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/market_mad/remotes/turnkeylinux/monitor b/src/market_mad/remotes/turnkeylinux/monitor index 0b0d5011d6..b2ca514484 100755 --- a/src/market_mad/remotes/turnkeylinux/monitor +++ b/src/market_mad/remotes/turnkeylinux/monitor @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/onedb/onedb b/src/onedb/onedb index e2d5e064b9..433489013e 100755 --- a/src/onedb/onedb +++ b/src/onedb/onedb @@ -46,6 +46,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/onedb/vcenter_one54_pre.rb b/src/onedb/vcenter_one54_pre.rb index 0953995bd2..673ae286b0 100644 --- a/src/onedb/vcenter_one54_pre.rb +++ b/src/onedb/vcenter_one54_pre.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/onegate/onegate-server.rb b/src/onegate/onegate-server.rb index 89c136b18d..8160762357 100644 --- a/src/onegate/onegate-server.rb +++ b/src/onegate/onegate-server.rb @@ -39,6 +39,7 @@ CONFIGURATION_FILE = ETC_LOCATION + "/onegate-server.conf" if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/pm_mad/remotes/dummy/deploy b/src/pm_mad/remotes/dummy/deploy index 3e1d29b78a..af265b956a 100755 --- a/src/pm_mad/remotes/dummy/deploy +++ b/src/pm_mad/remotes/dummy/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/ec2/cancel b/src/pm_mad/remotes/ec2/cancel index 033c3706d8..f14583b1eb 100755 --- a/src/pm_mad/remotes/ec2/cancel +++ b/src/pm_mad/remotes/ec2/cancel @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/ec2/deploy b/src/pm_mad/remotes/ec2/deploy index 604f611d79..ad223cdcef 100755 --- a/src/pm_mad/remotes/ec2/deploy +++ b/src/pm_mad/remotes/ec2/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/ec2/poll b/src/pm_mad/remotes/ec2/poll index 82d2c51a36..d0d2b4cca5 100755 --- a/src/pm_mad/remotes/ec2/poll +++ b/src/pm_mad/remotes/ec2/poll @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/ec2/reboot b/src/pm_mad/remotes/ec2/reboot index 80537aeb4a..411446b08b 100755 --- a/src/pm_mad/remotes/ec2/reboot +++ b/src/pm_mad/remotes/ec2/reboot @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/ec2/reset b/src/pm_mad/remotes/ec2/reset index b93ce88cb8..4b805d9eb8 100755 --- a/src/pm_mad/remotes/ec2/reset +++ b/src/pm_mad/remotes/ec2/reset @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/ec2/shutdown b/src/pm_mad/remotes/ec2/shutdown index db00864809..7581553663 100755 --- a/src/pm_mad/remotes/ec2/shutdown +++ b/src/pm_mad/remotes/ec2/shutdown @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/packet/cancel b/src/pm_mad/remotes/packet/cancel index e58934ebf8..5666b23ce1 100755 --- a/src/pm_mad/remotes/packet/cancel +++ b/src/pm_mad/remotes/packet/cancel @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/packet/deploy b/src/pm_mad/remotes/packet/deploy index e519ad12c5..041ec5d5f8 100755 --- a/src/pm_mad/remotes/packet/deploy +++ b/src/pm_mad/remotes/packet/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/packet/poll b/src/pm_mad/remotes/packet/poll index 8887036977..08023e1151 100755 --- a/src/pm_mad/remotes/packet/poll +++ b/src/pm_mad/remotes/packet/poll @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/packet/reboot b/src/pm_mad/remotes/packet/reboot index 4316ac9f4c..4b2d6203fd 100755 --- a/src/pm_mad/remotes/packet/reboot +++ b/src/pm_mad/remotes/packet/reboot @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/packet/reset b/src/pm_mad/remotes/packet/reset index 95cc87433f..5a9fc8da23 100755 --- a/src/pm_mad/remotes/packet/reset +++ b/src/pm_mad/remotes/packet/reset @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/pm_mad/remotes/packet/shutdown b/src/pm_mad/remotes/packet/shutdown index 91cd706514..a430560475 100755 --- a/src/pm_mad/remotes/packet/shutdown +++ b/src/pm_mad/remotes/packet/shutdown @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/sunstone/bin/novnc-server b/src/sunstone/bin/novnc-server index 715700486c..3b934903c7 100755 --- a/src/sunstone/bin/novnc-server +++ b/src/sunstone/bin/novnc-server @@ -42,6 +42,7 @@ SUNSTONE_ROOT_DIR = File.dirname(__FILE__) if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/sunstone/routes/nsx.rb b/src/sunstone/routes/nsx.rb index c0362f8b5b..3d6459e532 100644 --- a/src/sunstone/routes/nsx.rb +++ b/src/sunstone/routes/nsx.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/sunstone/sunstone-server.rb b/src/sunstone/sunstone-server.rb index 4e6beff88a..bc31dc3d2b 100755 --- a/src/sunstone/sunstone-server.rb +++ b/src/sunstone/sunstone-server.rb @@ -47,6 +47,7 @@ SUNSTONE_ROOT_DIR = File.dirname(__FILE__) if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/tm_mad/one_tm.rb b/src/tm_mad/one_tm.rb index 2d9e36c026..8654436521 100755 --- a/src/tm_mad/one_tm.rb +++ b/src/tm_mad/one_tm.rb @@ -32,6 +32,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/tm_mad/vcenter/clone b/src/tm_mad/vcenter/clone index 8b615f2c05..563c2735ce 100755 --- a/src/tm_mad/vcenter/clone +++ b/src/tm_mad/vcenter/clone @@ -34,7 +34,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/tm_mad/vcenter/cpds b/src/tm_mad/vcenter/cpds index 1a0aa1e310..2ae87c9b66 100755 --- a/src/tm_mad/vcenter/cpds +++ b/src/tm_mad/vcenter/cpds @@ -33,7 +33,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/tm_mad/vcenter/delete b/src/tm_mad/vcenter/delete index 0eecd647f2..32dbc7490c 100755 --- a/src/tm_mad/vcenter/delete +++ b/src/tm_mad/vcenter/delete @@ -33,7 +33,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/tm_mad/vcenter/mkimage b/src/tm_mad/vcenter/mkimage index adf9397968..e4da960cf0 100755 --- a/src/tm_mad/vcenter/mkimage +++ b/src/tm_mad/vcenter/mkimage @@ -34,7 +34,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/tm_mad/vcenter/mv b/src/tm_mad/vcenter/mv index 896aaf9569..c35296cb21 100755 --- a/src/tm_mad/vcenter/mv +++ b/src/tm_mad/vcenter/mv @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/tm_mad/vcenter/mvds b/src/tm_mad/vcenter/mvds index 557b9adb3a..76e060fd83 100755 --- a/src/tm_mad/vcenter/mvds +++ b/src/tm_mad/vcenter/mvds @@ -34,7 +34,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/tm_mad/vcenter/resize b/src/tm_mad/vcenter/resize index 576d49946a..e3b42cf3e0 100755 --- a/src/tm_mad/vcenter/resize +++ b/src/tm_mad/vcenter/resize @@ -28,7 +28,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/dummy/one_vmm_dummy.rb b/src/vmm_mad/dummy/one_vmm_dummy.rb index c7b0e33c8f..46039334a5 100755 --- a/src/vmm_mad/dummy/one_vmm_dummy.rb +++ b/src/vmm_mad/dummy/one_vmm_dummy.rb @@ -30,6 +30,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index 09d55a1dbf..aee5ff3e97 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -34,6 +34,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/az_driver.rb b/src/vmm_mad/remotes/az/az_driver.rb index ef47038ce1..48edc774ad 100755 --- a/src/vmm_mad/remotes/az/az_driver.rb +++ b/src/vmm_mad/remotes/az/az_driver.rb @@ -35,6 +35,7 @@ AZ_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/az.d/az-cache.db" if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/cancel b/src/vmm_mad/remotes/az/cancel index a1d3db4207..b13db1b6a9 100755 --- a/src/vmm_mad/remotes/az/cancel +++ b/src/vmm_mad/remotes/az/cancel @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/deploy b/src/vmm_mad/remotes/az/deploy index 8af0d4a712..6d20438843 100755 --- a/src/vmm_mad/remotes/az/deploy +++ b/src/vmm_mad/remotes/az/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/poll b/src/vmm_mad/remotes/az/poll index 870dfca31d..f88cf3786e 100755 --- a/src/vmm_mad/remotes/az/poll +++ b/src/vmm_mad/remotes/az/poll @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/reboot b/src/vmm_mad/remotes/az/reboot index 17c284c90c..97efadd443 100755 --- a/src/vmm_mad/remotes/az/reboot +++ b/src/vmm_mad/remotes/az/reboot @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/restore b/src/vmm_mad/remotes/az/restore index 96545b5ee8..2358dbdd2a 100755 --- a/src/vmm_mad/remotes/az/restore +++ b/src/vmm_mad/remotes/az/restore @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/az/shutdown b/src/vmm_mad/remotes/az/shutdown index fbabd8a40f..7981192e97 100755 --- a/src/vmm_mad/remotes/az/shutdown +++ b/src/vmm_mad/remotes/az/shutdown @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/cancel b/src/vmm_mad/remotes/ec2/cancel index d8415f497b..075513bda6 100755 --- a/src/vmm_mad/remotes/ec2/cancel +++ b/src/vmm_mad/remotes/ec2/cancel @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/deploy b/src/vmm_mad/remotes/ec2/deploy index f21d7e5c2d..439e794ca5 100755 --- a/src/vmm_mad/remotes/ec2/deploy +++ b/src/vmm_mad/remotes/ec2/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/ec2_driver.rb b/src/vmm_mad/remotes/ec2/ec2_driver.rb index 9c5ed65ce6..efb2a97c47 100755 --- a/src/vmm_mad/remotes/ec2/ec2_driver.rb +++ b/src/vmm_mad/remotes/ec2/ec2_driver.rb @@ -35,6 +35,7 @@ EC2_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/ec2.d/ec2-cache.db" if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/poll b/src/vmm_mad/remotes/ec2/poll index 6f53b52eaf..14148b7ec3 100755 --- a/src/vmm_mad/remotes/ec2/poll +++ b/src/vmm_mad/remotes/ec2/poll @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/reboot b/src/vmm_mad/remotes/ec2/reboot index 0fc372981e..f9daaca06d 100755 --- a/src/vmm_mad/remotes/ec2/reboot +++ b/src/vmm_mad/remotes/ec2/reboot @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/restore b/src/vmm_mad/remotes/ec2/restore index 8b1a8af56e..19ba5a89c9 100755 --- a/src/vmm_mad/remotes/ec2/restore +++ b/src/vmm_mad/remotes/ec2/restore @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/ec2/shutdown b/src/vmm_mad/remotes/ec2/shutdown index 19314eb05c..79e43bb432 100755 --- a/src/vmm_mad/remotes/ec2/shutdown +++ b/src/vmm_mad/remotes/ec2/shutdown @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/lib/nsx_driver/nsx_client.rb b/src/vmm_mad/remotes/lib/nsx_driver/nsx_client.rb index 7e9f868cf1..3e7b5b8864 100644 --- a/src/vmm_mad/remotes/lib/nsx_driver/nsx_client.rb +++ b/src/vmm_mad/remotes/lib/nsx_driver/nsx_client.rb @@ -31,6 +31,7 @@ module NSXDriver if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/lib/nsx_driver/nsx_constants.rb b/src/vmm_mad/remotes/lib/nsx_driver/nsx_constants.rb index b8342be355..2e6817812f 100644 --- a/src/vmm_mad/remotes/lib/nsx_driver/nsx_constants.rb +++ b/src/vmm_mad/remotes/lib/nsx_driver/nsx_constants.rb @@ -31,6 +31,7 @@ module NSXDriver if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/lib/nsx_driver/nsxt_client.rb b/src/vmm_mad/remotes/lib/nsx_driver/nsxt_client.rb index 7aa5c1cce2..e03da83776 100644 --- a/src/vmm_mad/remotes/lib/nsx_driver/nsxt_client.rb +++ b/src/vmm_mad/remotes/lib/nsx_driver/nsxt_client.rb @@ -31,6 +31,7 @@ module NSXDriver if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/lib/nsx_driver/nsxv_client.rb b/src/vmm_mad/remotes/lib/nsx_driver/nsxv_client.rb index 55069fbcf1..a9d28b7caf 100644 --- a/src/vmm_mad/remotes/lib/nsx_driver/nsxv_client.rb +++ b/src/vmm_mad/remotes/lib/nsx_driver/nsxv_client.rb @@ -31,6 +31,7 @@ module NSXDriver if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb index 25472af481..d228395144 100644 --- a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb +++ b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb @@ -35,6 +35,7 @@ module VCenterDriver if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/nsx/nsx_driver.rb b/src/vmm_mad/remotes/nsx/nsx_driver.rb index 4dbee36ac2..139e06a1d8 100644 --- a/src/vmm_mad/remotes/nsx/nsx_driver.rb +++ b/src/vmm_mad/remotes/nsx/nsx_driver.rb @@ -38,6 +38,7 @@ ENV['LANG'] = 'C' if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << LIB_LOCATION + '/ruby' diff --git a/src/vmm_mad/remotes/one/cancel b/src/vmm_mad/remotes/one/cancel index 0259205363..7aa4742923 100755 --- a/src/vmm_mad/remotes/one/cancel +++ b/src/vmm_mad/remotes/one/cancel @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/deploy b/src/vmm_mad/remotes/one/deploy index cd45ec4c22..77c1820efc 100755 --- a/src/vmm_mad/remotes/one/deploy +++ b/src/vmm_mad/remotes/one/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/opennebula_driver.rb b/src/vmm_mad/remotes/one/opennebula_driver.rb index 0000f8b12b..a8aca5a837 100755 --- a/src/vmm_mad/remotes/one/opennebula_driver.rb +++ b/src/vmm_mad/remotes/one/opennebula_driver.rb @@ -33,6 +33,7 @@ require 'yaml' if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/poll b/src/vmm_mad/remotes/one/poll index db01c05a9e..9d0bc10828 100755 --- a/src/vmm_mad/remotes/one/poll +++ b/src/vmm_mad/remotes/one/poll @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/reboot b/src/vmm_mad/remotes/one/reboot index d93de9e100..3d62408326 100755 --- a/src/vmm_mad/remotes/one/reboot +++ b/src/vmm_mad/remotes/one/reboot @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/reset b/src/vmm_mad/remotes/one/reset index 902d613494..7c5d02fedc 100755 --- a/src/vmm_mad/remotes/one/reset +++ b/src/vmm_mad/remotes/one/reset @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/restore b/src/vmm_mad/remotes/one/restore index ee3214a288..eb2d04bea5 100755 --- a/src/vmm_mad/remotes/one/restore +++ b/src/vmm_mad/remotes/one/restore @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/save b/src/vmm_mad/remotes/one/save index f02571d253..29d70c48e4 100755 --- a/src/vmm_mad/remotes/one/save +++ b/src/vmm_mad/remotes/one/save @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/one/shutdown b/src/vmm_mad/remotes/one/shutdown index a58811a109..2789cdfef7 100755 --- a/src/vmm_mad/remotes/one/shutdown +++ b/src/vmm_mad/remotes/one/shutdown @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/packet/cancel b/src/vmm_mad/remotes/packet/cancel index f5efa34bab..05a75d150a 100755 --- a/src/vmm_mad/remotes/packet/cancel +++ b/src/vmm_mad/remotes/packet/cancel @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/packet/deploy b/src/vmm_mad/remotes/packet/deploy index cf20f5e7db..41b569d209 100755 --- a/src/vmm_mad/remotes/packet/deploy +++ b/src/vmm_mad/remotes/packet/deploy @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/packet/packet_driver.rb b/src/vmm_mad/remotes/packet/packet_driver.rb index 287ee10fef..ec8d1caee2 100644 --- a/src/vmm_mad/remotes/packet/packet_driver.rb +++ b/src/vmm_mad/remotes/packet/packet_driver.rb @@ -32,6 +32,7 @@ PACKET_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/packet.d/packet-cache.db" if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << PACKET_LOCATION diff --git a/src/vmm_mad/remotes/packet/poll b/src/vmm_mad/remotes/packet/poll index be6bcb7dce..35bd5f3c2f 100755 --- a/src/vmm_mad/remotes/packet/poll +++ b/src/vmm_mad/remotes/packet/poll @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/packet/reboot b/src/vmm_mad/remotes/packet/reboot index cca8b2c265..bdda04a108 100755 --- a/src/vmm_mad/remotes/packet/reboot +++ b/src/vmm_mad/remotes/packet/reboot @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/packet/reset b/src/vmm_mad/remotes/packet/reset index a748f9d7d8..ce8e7527ff 100755 --- a/src/vmm_mad/remotes/packet/reset +++ b/src/vmm_mad/remotes/packet/reset @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/packet/shutdown b/src/vmm_mad/remotes/packet/shutdown index 552da0ca86..dd33883b9d 100755 --- a/src/vmm_mad/remotes/packet/shutdown +++ b/src/vmm_mad/remotes/packet/shutdown @@ -28,6 +28,7 @@ end if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << RUBY_LIB_LOCATION diff --git a/src/vmm_mad/remotes/vcenter/attach_disk b/src/vmm_mad/remotes/vcenter/attach_disk index 634319328b..2121d9f45f 100755 --- a/src/vmm_mad/remotes/vcenter/attach_disk +++ b/src/vmm_mad/remotes/vcenter/attach_disk @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/attach_nic b/src/vmm_mad/remotes/vcenter/attach_nic index 2ebb4e2a77..936ce880ef 100755 --- a/src/vmm_mad/remotes/vcenter/attach_nic +++ b/src/vmm_mad/remotes/vcenter/attach_nic @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/cancel b/src/vmm_mad/remotes/vcenter/cancel index 1781a9bc69..cbe3f4ee12 100755 --- a/src/vmm_mad/remotes/vcenter/cancel +++ b/src/vmm_mad/remotes/vcenter/cancel @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/deploy b/src/vmm_mad/remotes/vcenter/deploy index a4cc65d8aa..e3c9d6ed3a 100755 --- a/src/vmm_mad/remotes/vcenter/deploy +++ b/src/vmm_mad/remotes/vcenter/deploy @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/detach_nic b/src/vmm_mad/remotes/vcenter/detach_nic index 1f351eda6e..2bf9d9e1d7 100755 --- a/src/vmm_mad/remotes/vcenter/detach_nic +++ b/src/vmm_mad/remotes/vcenter/detach_nic @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/migrate b/src/vmm_mad/remotes/vcenter/migrate index 37dde17a93..d748994a14 100755 --- a/src/vmm_mad/remotes/vcenter/migrate +++ b/src/vmm_mad/remotes/vcenter/migrate @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/poll b/src/vmm_mad/remotes/vcenter/poll index 45cebfd8a1..2bb66e4126 100755 --- a/src/vmm_mad/remotes/vcenter/poll +++ b/src/vmm_mad/remotes/vcenter/poll @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/reboot b/src/vmm_mad/remotes/vcenter/reboot index 0f5852b0e4..cb26921f41 100755 --- a/src/vmm_mad/remotes/vcenter/reboot +++ b/src/vmm_mad/remotes/vcenter/reboot @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/reconfigure b/src/vmm_mad/remotes/vcenter/reconfigure index f70660d2b3..f58ebffecd 100755 --- a/src/vmm_mad/remotes/vcenter/reconfigure +++ b/src/vmm_mad/remotes/vcenter/reconfigure @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/reset b/src/vmm_mad/remotes/vcenter/reset index 40460f263c..1848b506b9 100755 --- a/src/vmm_mad/remotes/vcenter/reset +++ b/src/vmm_mad/remotes/vcenter/reset @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/restore b/src/vmm_mad/remotes/vcenter/restore index 1e040d81f4..ac118e14f8 100755 --- a/src/vmm_mad/remotes/vcenter/restore +++ b/src/vmm_mad/remotes/vcenter/restore @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/save b/src/vmm_mad/remotes/vcenter/save index 24083d31bb..382c47888a 100755 --- a/src/vmm_mad/remotes/vcenter/save +++ b/src/vmm_mad/remotes/vcenter/save @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/shutdown b/src/vmm_mad/remotes/vcenter/shutdown index 5888821f64..60ad872692 100755 --- a/src/vmm_mad/remotes/vcenter/shutdown +++ b/src/vmm_mad/remotes/vcenter/shutdown @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/snapshot_create b/src/vmm_mad/remotes/vcenter/snapshot_create index 53389955b9..d63f0df03b 100755 --- a/src/vmm_mad/remotes/vcenter/snapshot_create +++ b/src/vmm_mad/remotes/vcenter/snapshot_create @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/snapshot_delete b/src/vmm_mad/remotes/vcenter/snapshot_delete index f4ed77f384..73edfd10af 100755 --- a/src/vmm_mad/remotes/vcenter/snapshot_delete +++ b/src/vmm_mad/remotes/vcenter/snapshot_delete @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/snapshot_revert b/src/vmm_mad/remotes/vcenter/snapshot_revert index 6c9680b250..aa9837bf40 100755 --- a/src/vmm_mad/remotes/vcenter/snapshot_revert +++ b/src/vmm_mad/remotes/vcenter/snapshot_revert @@ -26,7 +26,10 @@ else GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end -Gem.use_paths(GEMS_LOCATION) if File.directory?(GEMS_LOCATION) +if File.directory?(GEMS_LOCATION) + Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } +end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) diff --git a/src/vmm_mad/remotes/vcenter/vcenter_driver.rb b/src/vmm_mad/remotes/vcenter/vcenter_driver.rb index 621d2d2ed4..20367a0c03 100644 --- a/src/vmm_mad/remotes/vcenter/vcenter_driver.rb +++ b/src/vmm_mad/remotes/vcenter/vcenter_driver.rb @@ -38,6 +38,7 @@ ENV['LANG'] = 'C' if File.directory?(GEMS_LOCATION) Gem.use_paths(GEMS_LOCATION) + $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ } end $LOAD_PATH << LIB_LOCATION + '/ruby/vendors/rbvmomi/lib'