What have you found for these years?

2012-09-21

Save myself from bundler (3)

I got a better fix. See this commit.

bundler/setup.rb:
rubyopt = ENV['RUBYOPT']
require 'bundler/monkey'
require Gem.find_files('bundler/setup')[1]
ENV['RUBYOPT'] = rubyopt

bundler/monkey.rb:
begin
  require 'bundler/settings'
rescue LoadError
  puts "Run \e[35m`gem install bundler`\e[0m to install bundler."
  exit 1
end

module Bundler
  class Settings
    def path
      key  = key_for(:path)
      path = ENV[key]
      return path if path && !@local_config.key?(key)

      if path = self[:path] || @global_config[key]
        "#{path}/#{Bundler.ruby_scope}"
      else
        Bundler.rubygems.gem_dir
      end
    end
  end
end

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0