Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

ERROR: Error installing bundler: bundler requires Ruby version >= 2.3.0. #6865

Closed
oshivwanshi opened this issue Jan 3, 2019 · 7 comments
Closed

Comments

@oshivwanshi
Copy link

We were using Bundler version 1.12.5 with ruby version = "2.1" , 'poise-ruby', '~> 2.4.0' and 'poise-ruby-build', '~> 1.1.0'

But after the release Bundler version 2.0.0 - January 03, 2019 we are getting this error STDERR: ERROR: Error installing bundler:bundler requires Ruby version >= 2.3.0.
can anyone please help me with this issue?

`===================================================================

Error executing action `install` on resource 'ruby_runtime[logFileCollector-ruby-2.1]'

===================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
ruby_gem[bundler] (/var/chef/cache/cookbooks/poise-ruby/files/halite_gem/poise_ruby/ruby_providers/base.rb line 109) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/ruby_build/builds/logFileCollector-ruby-2.1/bin/gem install bundler -q --no-rdoc --no-ri -v "2.0.0" ----
STDOUT:
STDERR: ERROR:  Error installing bundler:
    bundler requires Ruby version >= 2.3.0.
---- End output of /opt/ruby_build/builds/logFileCollector-ruby-2.1/bin/gem install bundler -q --no-rdoc --no-ri -v "2.0.0" ----
Ran /opt/ruby_build/builds/logFileCollector-ruby-2.1/bin/gem install bundler -q --no-rdoc --no-ri -v "2.0.0" returned 1

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/poise-ruby/files/halite_gem/poise_ruby/resources/ruby_gem.rb:75:in `block in action_upgrade'
/var/chef/cache/cookbooks/poise-ruby/files/halite_gem/poise_ruby/resources/ruby_gem.rb:111:in `patch_environment'
/var/chef/cache/cookbooks/poise-ruby/files/halite_gem/poise_ruby/resources/ruby_gem.rb:75:in `action_upgrade'
/var/chef/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
/var/chef/cache/cookbooks/poise-ruby/files/halite_gem/poise_ruby/ruby_providers/base.rb:43:in `action_install'

`

@jsmartt
Copy link

jsmartt commented Jan 3, 2019

This looks like it's expected behavior. See https://bundler.io/guides/bundler_2_upgrade.html

@keith
Copy link

keith commented Jan 3, 2019

FYI this means that the version of /usr/bin/gem (2.5.2.3) that ships with macOS 10.14.2 (currently the newest point release) is no longer supported.

@indirect
Copy link
Member

indirect commented Jan 3, 2019

Bundler 2 no longer supports versions of Ruby that are so old they have been abandoned by the ruby-core team. That includes Ruby 2.2 and older. This is intended behavior, sorry.

@indirect indirect closed this as completed Jan 3, 2019
zubin added a commit to envato/jwt_signed_request that referenced this issue Jan 8, 2019
> Bundler 2 no longer supports versions of Ruby that are so old they
> have been abandoned by the ruby-core team. That includes Ruby 2.2 and
> older. This is intended behavior, sorry.

Source: rubygems/bundler#6865 (comment)
khiav223577 pushed a commit to khiav223577/deep_pluck that referenced this issue Jan 9, 2019
khiav223577 pushed a commit to khiav223577/atomically that referenced this issue Jan 9, 2019
@vhladiienko
Copy link

vhladiienko commented Jan 9, 2019

If someone Googles this, just install the version from your Gemfile.lock by running two commands as shown in the official blog post here.

cat Gemfile.lock | grep -A 1 "BUNDLED WITH"
BUNDLED WITH
   1.17.3

gem install bundler -v '1.17.3'

In my case I had this error when building a docker container, so I just replaced RUN gem install bundler with RUN gem install bundler -v '1.16.1' in my Dockerfile.

@ahmad-shawky
Copy link

Fixed by using @vgladiyenko answer.

opencontrail-ci-admin pushed a commit to Juniper/contrail-zuul-jobs that referenced this issue Feb 21, 2019
The most recent version of bundler does not support Puppet version used in
contrail-infra. Pin it to some previous version.

Further info:
rubygems/bundler#6865

Change-Id: I8a3781f46ce5e7e6043ba3b5c50f500e8435af35
@rolandvarga
Copy link

@vgladiyenko thank you this helped with a time travel project!

emesc pushed a commit to envato-archive/subvalid that referenced this issue Mar 27, 2019
> Bundler 2 no longer supports versions of Ruby that are so old they
> have been abandoned by the ruby-core team. That includes Ruby 2.2 and
> older. This is intended behavior, sorry.

Source: rubygems/bundler#6865 (comment)
emesc pushed a commit to envato-archive/subvalid that referenced this issue Mar 27, 2019
> Bundler 2 no longer supports versions of Ruby that are so old they
> have been abandoned by the ruby-core team. That includes Ruby 2.2 and
> older. This is intended behavior, sorry.

Source: rubygems/bundler#6865 (comment)
emesc pushed a commit to envato-archive/subvalid that referenced this issue Mar 27, 2019
> Bundler 2 no longer supports versions of Ruby that are so old they
> have been abandoned by the ruby-core team. That includes Ruby 2.2 and
> older. This is intended behavior, sorry.

Source: rubygems/bundler#6865 (comment)
@mrhardikjoshi
Copy link

mrhardikjoshi commented Feb 14, 2020

If you do not want to update your project's ruby version due to some reason, you can install the last supported version of Bundler for Ruby < 2.3: (that should get rid of above error and will install older version of bundler)

gem install bundler -v '~>1'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants