diff --git a/src/mad/sh/madcommon.sh b/src/mad/sh/madcommon.sh index 2b171c191c..e1ffbb6060 100644 --- a/src/mad/sh/madcommon.sh +++ b/src/mad/sh/madcommon.sh @@ -72,3 +72,20 @@ export_rc_vars $DEFAULTRC if [ -z "$PRIORITY" ]; then export PRIORITY=19 fi + +# Add ruby vendorized libraries to the path +if [ -z "${ONE_LOCATION}" ]; then + VENDOR=/usr/lib/one/ruby/vendors +else + VENDOR=$ONE_LOCATION/lib/ruby/vendors +fi + +ls $VENDOR/*/lib &> /dev/null +if [ $? = 0 ]; then + if [ -n "$RUBYLIB" ]; then + RUBYLIB="$RUBYLIB:" + fi + + RUBYLIB="${RUBYLIB}$(echo $VENDOR/*/lib | tr ' ' ':')" +fi +