Fail when version of target gem is not satisfied #37

Closed
mojavelinux opened this Issue Dec 7, 2012 · 4 comments

Comments

Projects
None yet
3 participants

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.

bundle install

Next, change the version to something different.

gem "sass", "3.1.20"

Finally, run the binary and consult the version.

sass --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
Examining /home/dallen/tmp/foo/Gemfile
Considering "/home/dallen/tmp/foo/.noexec.yaml"
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.

Owner

mpapis commented Dec 7, 2012

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).

Owner

mpapis commented Dec 7, 2012

@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?

envygeeks was assigned Apr 15, 2013

Owner

mpapis commented Apr 15, 2013

@envygeeks scheduling for 1.2.0.rc1

mpapis was assigned Jul 11, 2013

mpapis closed this in d435e83 Jul 12, 2013

Owner

mpapis commented Jul 12, 2013

released as 1.3.0.rc2

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