Bundler itself does not respect Gemfile version requirements because it would disable many existing applications—some versions of Rails say that they depend on Bundler 1.0.x, and Bundler 1.1 had to start ignoring that requirement to continue functioning in those applications.
You can implement your own exception, if you really want to, by adding a line like this to the top of your Gemfile:
> On Mar 1, 2016, at 11:12 AM, Mario Zaizar <
mario...@gmail.com> wrote:
>
> Thanks for your comments Samuel, unfortunately using another gem to validate bundler that seems risky.
> It still feels weird to me that Bundler is not able to prevent beta versions to be used (specially if you specify only acceptable version to use)
>
> I guess there is no way to prevent people having/using the pre versions, or avoid changes to the BUNDLED WITH and RUBY VERSION sections in the lock file caused by this.
>
> I guess I will just ignore this merge conflicts, or implement an external validations for this. Thanks anyways.
>
> -Mario
>
> From: Samuel Giddins <
ruby-b...@googlegroups.com>
> Reply:
ruby-b...@googlegroups.com <
ruby-b...@googlegroups.com>
> Date: March 1, 2016 at 10:37:59 AM
> To: Mario Zaizar <
mario...@gmail.com>
> Subject: Re: How to tell Bundler to NOT use any --pre version?
>
>> Bundler is unable to lock itself, since it is being invoked by RubyGems. One option for you it to use the postit gem, which will automatically load the correct bundler version. (
https://github.com/segiddins/postit)
>>
>> —
>> Samuel Giddins
>>