Skip to content

Instantly share code, notes, and snippets.

@indirect
Created November 16, 2010 16:45
Show Gist options
  • Save indirect/b8d47d4ca590e7b00539 to your computer and use it in GitHub Desktop.
Save indirect/b8d47d4ca590e7b00539 to your computer and use it in GitHub Desktop.
[andre ~/sw/gems/bundler-testcases/i850]$ cat Gemfile
gem "rack"
[andre ~/sw/gems/bundler-testcases/i850]$ dbundle install
Using rack (1.2.1)
Using bundler (1.0.5)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
[andre ~/sw/gems/bundler-testcases/i850]$ cat test.rb
require 'rubygems'
require 'bundler/setup'
puts "With env: #{ENV['BUNDLE_GEMFILE']}"
Bundler.with_clean_env do
puts "With clean: #{ENV['BUNDLE_GEMFILE']}"
end
[andre ~/sw/gems/bundler-testcases/i850]$ echo $BUNDLE_GEMFILE
[andre ~/sw/gems/bundler-testcases/i850]$ ruby test.rb
With env: /Users/andre/sw/gems/bundler-testcases/i850/Gemfile
With clean:
@indirect
Copy link
Author

No, unfortunately that's not possible. The ruby interpreter is only able to load a single set of libraries, which is why Bundler has to resolve the entire dependency graph before the interpreter even starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment