# File lib/merb-core/tasks/merb_rake_helper.rb, line 21
    def self.install_package(pkg, options = {})
      defaults = { :cache => false }
      defaults[:install_dir] = ENV['GEM_DIR'] if ENV['GEM_DIR']
      opts = defaults.merge(options)
      # Needs to be executed from the directory that contains all packages
      Dir.chdir(File.dirname(pkg_file = File.expand_path(pkg))) do 
        install_gem(pkg_file, opts)
      end
      name = File.basename(pkg, '.gem')[/^(.*?)-([\d\.]+)$/, 1]
      ensure_wrapper(opts[:install_dir] || Gem.default_dir, name)
    end