From dbd4f14ab54b1148a85e2c56d3955af2b9f88d0d Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 25 Nov 2010 13:02:42 +0100 Subject: [PATCH] Load ruby libs path in ImageRepository(cherry picked from commit 52ff006835738b441e4e0a642a5dac6e73d32d3f) --- src/oca/ruby/OpenNebula/ImageRepository.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/oca/ruby/OpenNebula/ImageRepository.rb b/src/oca/ruby/OpenNebula/ImageRepository.rb index 63c510bbbd..5cec29761b 100644 --- a/src/oca/ruby/OpenNebula/ImageRepository.rb +++ b/src/oca/ruby/OpenNebula/ImageRepository.rb @@ -14,6 +14,16 @@ # limitations under the License. # #--------------------------------------------------------------------------- # +ONE_LOCATION=ENV["ONE_LOCATION"] + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + +$: << RUBY_LIB_LOCATION + require 'OpenNebula/Image' require 'fileutils' require 'CommandManager'