hack required to make chef/fog work
bretweinraub opened this issue · 5 comments
I can't explain yet why commenting out the require "bundler/setup"
makes it work for you. The bundler documentation actually recommends it... I'll see if I can recreate it somewhere else.
btw, have you tried (with the require "bundler/setup"
in place) running knife
this way?:
bundle exec knife ec2 server list -A [key] -K [key]
From the bundler website:
Run an executable that comes with a gem in your bundle
$ bundle exec rspec spec/models
In some cases, running executables without bundle exec may work, if the executable
happens to be installed in your system and does not pull in any gems that conflict with your
bundle.However, this is unreliable and is the source of considerable pain. Even if it looks like it
works, it may not work in the future or on another machine.If you want a way to get a shortcut to gems in your bundle
$ bundle install --binstubs $ bin/rspec spec/models
The executables installed into bin are scoped to the bundle and will always work.
I'm not sure that it actually is needed/recommended in a case like this. It's a bit unclear to me reading through it though. I think you should use require 'bundler/setup' in something that relies on a Gemfile to run, like say a sinatra app. But a gem should rely on its gemspec to provide its dependencies, rather than bundler (though they are pretty related). I think I have perhaps made mistakes related to this in the past as well, but you should be able to safely remove it I think.
@geemus: I think you're right. I'll go ahead and take it (re: require "bundle/setup"
) out for the next release.
But I think bundle exec knife ec2 server list -A [key] -K [key]
would still be the "right" way to invoke knife
...
Closing this. require "bundler/setup"
is no longer invoked.