class Bundler::Bundle
def expand_gemfile(spec, options)
def expand_gemfile(spec, options) Bundler.logger.info "Installing #{spec.name} (#{spec.version})" gemfile = @cache_path.join("#{spec.full_name}.gem").to_s if build_args = options[:build_options] && options[:build_options][spec.name] Gem::Command.build_args = build_args.map {|k,v| "--with-#{k}=#{v}"} end installer = Gem::Installer.new(gemfile, options.merge( :install_dir => gem_path, :ignore_dependencies => true, :env_shebang => true, :wrappers => true, :bin_dir => bindir )) installer.install rescue Gem::InstallError cleanup_spec(spec) raise ensure Gem::Command.build_args = [] end