Skip to content

Instantly share code, notes, and snippets.

@scottmuc
Created June 5, 2012 18:53
Show Gist options
  • Save scottmuc/2876931 to your computer and use it in GitHub Desktop.
Save scottmuc/2876931 to your computer and use it in GitHub Desktop.
Why is -rbundle/setup here?
Rakefile is:
task :test do
sh "env > test.env"
end
my local env doesn't have RUBYOPT set, but when I run `rake test` I see the following:
RUBYOPT=-I/Users/ThoughtWorks/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib -rbundler/setup
I don't want -rbundler/setup
@mpapis
Copy link

mpapis commented Jun 5, 2012

it's because you have gem rubygems-bundler it automatically loads bundler if Gemfile is available, use NOEXEC=0 rake to avoid automatic loading

@scottmuc
Copy link
Author

scottmuc commented Jun 5, 2012

YES! That makes sense. I guess that's now part of the global gemset by default now?

@mpapis
Copy link

mpapis commented Jun 5, 2012

yes it is, it is meant to automatically use bundle exec for you, in case you do not want it to load bundler just use NOEXEC=0

@scottmuc
Copy link
Author

scottmuc commented Jun 5, 2012

Awesome! That totally solved our issue. Our precommit Rakefile is full of 'sh "bundle exec ..."' and this behaviour was causing us issues. Good to know that this all makes sense now. Was really confused there for a bit :-). Thank you for your extremely quick response!

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