def setup_export
    paths = ENV["PATH"].split(":").map do |path|
      /^\/.*/ !~ path ? "#{app_path}/#{path}" : path
    end.join(":")

    # TODO ensure path exported is correct
    set_export_path "PATH", paths

    gem_path = "#{app_path}/#{slug_vendor_base}"
    set_export_path "GEM_PATH", gem_path
    set_export_default "LANG", "en_US.UTF-8"

    # TODO handle jruby
    if ruby_version.jruby?
      set_export_default "JRUBY_OPTS", default_jruby_opts
    end

    set_export_default "BUNDLE_PATH", ENV["BUNDLE_PATH"]
    set_export_default "BUNDLE_WITHOUT", ENV["BUNDLE_WITHOUT"]
    set_export_default "BUNDLE_BIN", ENV["BUNDLE_BIN"]
    set_export_default "BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE", ENV["BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE"]
    set_export_default "BUNDLE_DEPLOYMENT", ENV["BUNDLE_DEPLOYMENT"] # Unset on windows since we delete the Gemfile.lock
  end
Sets up the environment variables for subsequent processes run by
muiltibuildpack. We can't use profile.d because $HOME isn't set up