Skip to content

Instantly share code, notes, and snippets.

@Edouard-chin
Created July 3, 2018 17:08
Show Gist options
  • Save Edouard-chin/285a48c11e7c7de22a8daaffbeccc6fd to your computer and use it in GitHub Desktop.
Save Edouard-chin/285a48c11e7c7de22a8daaffbeccc6fd to your computer and use it in GitHub Desktop.
Dualboot ruby app
if ENV['RAILS_NEXT']
module Bundler::SharedHelpers
def default_lockfile=(path)
@default_lockfile = path
end
def default_lockfile
@default_lockfile ||= Pathname.new("#{default_gemfile}.lock")
end
end
Bundler::SharedHelpers.default_lockfile = Pathname.new("#{Bundler::SharedHelpers.default_gemfile}_next.lock")
class Bundler::Dsl
unless self.method_defined? :to_definition_unpatched
alias_method :to_definition_unpatched, :to_definition
end
def to_definition(bad_lockfile, unlock)
to_definition_unpatched(Bundler::SharedHelpers.default_lockfile, unlock)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment