lib/hobo/bundler.rb in hobo-inviqa-0.0.14 vs lib/hobo/bundler.rb in hobo-inviqa-0.0.15
- old
+ new
@@ -26,16 +26,16 @@
bundler_install = ::Bundler::CLI::Install.new({})
begin
bundler_install.run
Kernel.exec('hobo', *$HOBO_ARGV)
- rescue Exception => e
+ rescue Exception => exception
puts
puts "Failed to install dependencies. Hobo can not proceed."
puts "Please see the error below:"
puts
- throw exception
+ raise
end
end
def self.isolate
::Bundler.with_clean_env do
@@ -43,9 +43,15 @@
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../Gemfile', __FILE__)
# Ensure Bundler is not caching anything
::Bundler.instance_variable_set('@load', nil)
::Bundler.definition true
+
+ # This is required as of 1.6.5 due to this commit:
+ # https://github.com/bundler/bundler/commit/4870340132878c30d49a5d5fc27257e2abe46e7e
+ ::Bundler.class_eval do
+ @root = Pathname.new File.dirname(ENV['BUNDLE_GEMFILE'])
+ end
begin
::Bundler.setup(:default)
rescue ::Bundler::GemNotFound => exception
puts "Missing runtime dependencies: #{exception}"