#!/bin/bash set -e # Figure out where this script is located. SELFDIR="`dirname \"$0\"`" SELFDIR="`cd \"$SELFDIR\" && pwd`" cd $SELFDIR/lib/app/ ## GEMFILE if [ -f "$SELFDIR/lib/vendor/Gemfile" ] then # Tell Bundler where the Gemfile and gems are. export BUNDLE_GEMFILE="$SELFDIR/lib/vendor/Gemfile" unset BUNDLE_IGNORE_CONFIG # Run the actual app using the bundled Ruby interpreter, with Bundler activated. exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup "$1" else exec "$SELFDIR/lib/ruby/bin/ruby" "$1" fi