Currently, if the version specified in the Gemfile for the target gem is not installed, then noexec gives up and allows Ruby to select the default version. IMHO, this defeats the whole purpose of using bundle exec. It should fail fast (or make a setting to determine whether it does or not).
To reproduce, install a gem. Then, create a Gemfile that specifies it as a requirement.
gem "sass", "3.1.21"
Then, get it installed.
Next, change the version to something different.
gem "sass", "3.1.20"
Finally, run the binary and consult the version.
You'll see that it reports "3.1.21" instead of failing to execute.
Turning on debug, you'll see that noexec wasn't happy with what was going on:
$ NOEXEC_DEBUG=1 sass --version
Noexec - starting check
Ignoring candidate /home/dallen/tmp/foo/Gemfile:
Could not find gem 'sass (= 3.1.20) ruby' in the gems available on this machine.
No valid Gemfile found, moving on
Sass 3.1.21 (Brainy Betty)
I think this should be a failure scenario.
ok good point, now consider an example from @wycats gist: https://gist.github.com/85d4c0a9844b11f104cb where you use rake bundler:install which is not the best thing to do, but still might be something you might want to have.
anyway - you would like to have an option to do a warning instead and allow to run it anyway - good idea (options are good).
@mojavelinux could you also consider this request with mpapis#36 - maybe they could be mixed ? like fail uless in @global, what do you think about that?
fail uless in @global
@envygeeks scheduling for 1.2.0.rc1
released as 1.3.0.rc2