Skip to content

compatibility problem with latest ruby 2.6 #1021

@ghost

Description

bundle install --force
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
mysql2-0.5.2-x64-mingw32 requires ruby version >= 2.0, < 2.6, which is
incompatible with the current version, ruby 2.6.0p0

Activity

added this to the 0.5.3 milestone on Jan 28, 2019
sodabrew

sodabrew commented on Jan 28, 2019

@sodabrew
Collaborator

Known issue. Will include Ruby 2.6 for Windows builds in the next release.

ghost

ghost commented on Jan 29, 2019

@ghost

Thanks. Is there any timeline for next release ?

jsh562

jsh562 commented on Jan 31, 2019

@jsh562

+1 any estimate? as I am in the middle of planning/executing an upgrade

omarsayeedkhan

omarsayeedkhan commented on Feb 16, 2019

@omarsayeedkhan

Is there any further updates to this or any known workaround in order to have this working in Windows 10 (64Bit) ?
λ gem install mysql2
ERROR: Error installing mysql2:
The last version of mysql2 (>= 0) to support your Ruby & RubyGems was 0.5.2. Try installing it with gem install mysql2 -v 0.5.2
mysql2 requires Ruby version >= 2.0, < 2.6. The current ruby version is 2.6.1.33.

dsisnero

dsisnero commented on Mar 13, 2019

@dsisnero

any update on this?

iris-liu0312

iris-liu0312 commented on Mar 22, 2019

@iris-liu0312

Also having this problem.

gem install mysql2 -v 0.5.2
ERROR: Error installing mysql2:
The last version of mysql2 (= 0.5.2) to support your Ruby & RubyGems was 0.5.2. Try installing it with gem install mysql2 -v 0.5.2
mysql2 requires Ruby version >= 2.0, < 2.6. The current ruby version is 2.6.1.33.

andikarekatias

andikarekatias commented on Apr 1, 2019

@andikarekatias

Known issue. Will include Ruby 2.6 for Windows builds in the next release.

when is the next release?

rahadur

rahadur commented on May 4, 2019

@rahadur

λ gem install mysql2 -v 0.5.2

ERROR:  Error installing mysql2:
        The last version of mysql2 (= 0.5.2) to support your Ruby & RubyGems was 0.5.2.
        Try installing it with `gem install mysql2 -v 0.5.2`
        mysql2 requires Ruby version >= 2.0, < 2.6. The current ruby version is 2.6.3.62.

When is the next release come?

Environment

  • Windows 10
  • Ruby 2.6.3p62
  • MySQL 8.0.16
unknown-acolyte

unknown-acolyte commented on May 9, 2019

@unknown-acolyte

I'm also very interested in the timeline on this release.

steffanllyn-ln

steffanllyn-ln commented on Jun 5, 2019

@steffanllyn-ln

I'm also keenly interested in the resolution of this incompatibility with Ruby 2.6; our test automation framework is effectively locked into a deprecated version of Ruby (2.3) until mysql2 is updated.

babilonczyk

babilonczyk commented on Jul 9, 2019

@babilonczyk

Does anyone know when is the next release?

lisbethw1130

lisbethw1130 commented on Jul 11, 2019

@lisbethw1130

Any furthur news about this?

anicething

anicething commented on Jul 15, 2019

@anicething

λ gem install mysql2 -v 0.5.2

ERROR:  Error installing mysql2:
        The last version of mysql2 (= 0.5.2) to support your Ruby & RubyGems was 0.5.2.
        Try installing it with `gem install mysql2 -v 0.5.2`
        mysql2 requires Ruby version >= 2.0, < 2.6. The current ruby version is 2.6.3.62.

When is the next release come?

Environment

  • Windows 10
  • Ruby 2.6.3p62
  • MySQL 8.0.16

I met the same problem.

3 remaining items

sudhin-joseph

sudhin-joseph commented on Sep 21, 2019

@sudhin-joseph

...when I cut the release. Sorry for the ambiguity and delay, gotta make time for this.

Please create a fix or a suggest a workaround at the earliest.

hyrious

hyrious commented on Sep 24, 2019

@hyrious

Workaround: manually download the .gem file then install it:

gem i mysql2-0.5.2.gem
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libmariadbclient
Building native extensions. This could take a while...
Successfully installed mysql2-0.5.2
Parsing documentation for mysql2-0.5.2
Installing ri documentation for mysql2-0.5.2
Done installing documentation for mysql2 after 1 seconds
1 gem installed

This issue might be caused by releasing multiple 0.5.2 packages, but I don't know how to fix it either.

cpruitt

cpruitt commented on Sep 24, 2019

@cpruitt

Hi @sodabrew 👋🏼. First, thank you for all the work needed to maintain and release mysql2.

Rails master (6.1.alpha) recently updated it's Gemfile to require "mysql2", "~> 0.5" (rails/rails#37191). This has become an issue because bundler enforces the windows < 2.6 Ruby version requirement even when the current platform is not Windows. This means that running bundle update with a checked out copy of Rails master fails. (See rails/rails#37224)

This also affects us at GitHub because we experience this failure as part of our update process for testing against Rails master. Although there are some short-term workarounds, this issue is preventing our update processes from working correctly.

Anything you might be able to do to expedite this update and increase the windows ruby version requirement would be greatly appreciated at GitHub and, I'm sure, by the Rails community as a whole. Thanks!

breisig

breisig commented on Sep 24, 2019

@breisig

We also can't get our rails 6 project working without the proper fix released.

ghost

ghost commented on Sep 24, 2019

@ghost

Hi @sodabrew, If you have no time for the new release maybe Rails developers team should pick this up? The plug-in actually important for Rails 6 and mysql compatibility. Many people are using mysql. It is actually baffling why such plugins are actually not part of Rails. Rails require databases to run, strange approach to be honest.

MacLove13

MacLove13 commented on Oct 24, 2019

@MacLove13

Awaiting a solution

piperino29

piperino29 commented on Nov 1, 2019

@piperino29

Awaiting a solution...

titibudala

titibudala commented on Nov 13, 2019

@titibudala

Anything?

philCryoport

philCryoport commented on Nov 20, 2019

@philCryoport

Workaround: manually download the .gem file then install it:

gem i mysql2-0.5.2.gem
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libmariadbclient
Building native extensions. This could take a while...
Successfully installed mysql2-0.5.2
Parsing documentation for mysql2-0.5.2
Installing ri documentation for mysql2-0.5.2
Done installing documentation for mysql2 after 1 seconds
1 gem installed

This issue might be caused by releasing multiple 0.5.2 packages, but I don't know how to fix it either.

So I downloaded the gem manually and installed it...and then when I ran bundle install, it complained once again that mysql2 v0.5.2 was not compatible with Ruby 2.6.x

C:\Users\Foo\GitHub\Bar>gem i c:\users\Foo\Downloads\mysql2-0.5.2.gem
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libmariadbclient
Building native extensions. This could take a while...
Successfully installed mysql2-0.5.2
Parsing documentation for mysql2-0.5.2
Installing ri documentation for mysql2-0.5.2
Done installing documentation for mysql2 after 1 seconds
1 gem installed

C:\Users\Foo\GitHub\Bar>bundle install
Fetching gem metadata from https://rubygems.org/...
mysql2-0.5.2-x64-mingw32 requires ruby version < 2.6, which is incompatible with
the current version, ruby 2.6.5p114

I looked through the bundle documentation and I didn't see a way to request that bundle install ignore the mysql2 gem as it's already installed. Ideas?

--
Edited to add: For now, I've downgraded my installed ruby to 2.5.7.

FYI to any Windows-based developers out there: because of this issue, I'm trying out uru to switch between installed ruby versions. I installed uru using the scoop method -- and installed ruby versions using scoop (tip: the dash at the end is essential when specifying a ruby version to install:

scoop install ruby@2.5.7-1
rem I left out the `ridk install` step here because I already had done that previously
uru admin add 'C:\users\Foo\scoop\apps\ruby\2.5.7-1\bin'
sodabrew

sodabrew commented on Nov 27, 2019

@sodabrew
Collaborator

https://rubygems.org/gems/mysql2 0.5.3 is now posted with updated Windows pre-built binaries for Ruby 2.2 - 2.6.

lydiap01

lydiap01 commented on Dec 16, 2019

@lydiap01

https://rubygems.org/gems/mysql2 0.5.3 is now posted with updated Windows pre-built binaries for Ruby 2.2 - 2.6.

sodabrew - newbie here- what exactly do I do to access https://rubygems.org/gems/mysql2 0.5.3?

lydiap01

lydiap01 commented on Dec 16, 2019

@lydiap01

https://rubygems.org/gems/mysql2 0.5.3 is now posted with updated Windows pre-built binaries for Ruby 2.2 - 2.6.

sodabrew - newbie here- what exactly do I do to access https://rubygems.org/gems/mysql2 0.5.3?

Please disregard. I had a "d'uh" moment! I fixed it.

podor

podor commented on Oct 19, 2020

@podor

Hello,
I'm newbie in ruby, I tried to install Redmine on W10 but I have this:

C:\redmine-4.1.1>gem install mysql2 -v 0.5.3
ERROR: Error installing mysql2:
The last version of mysql2 (= 0.5.3) to support your Ruby & RubyGems was 0.5.3. Try installing it with gem install mysql2 -v 0.5.3 mysql2 requires Ruby version >= 2.2, < 2.7.dev. The current ruby version is 2.7.2.137.

It seems that the new version of mysql2 (0.5.3) donc really work with ruby v2.7

RubyGems Environment:

  • RUBYGEMS VERSION: 3.1.4
  • RUBY VERSION: 2.7.2 (2020-10-01 patchlevel 137) [x64-mingw32]
  • INSTALLATION DIRECTORY: C:/Ruby27-x64/lib/ruby/gems/2.7.0
  • USER INSTALLATION DIRECTORY: C:/Users/podor/.gem/ruby/2.7.0
  • RUBY EXECUTABLE: C:/Ruby27-x64/bin/ruby.exe
  • GIT EXECUTABLE:
  • EXECUTABLE DIRECTORY: C:/Ruby27-x64/bin
  • SPEC CACHE DIRECTORY: C:/Users/podor/.gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  • RUBYGEMS PLATFORMS:
    • ruby
    • x64-mingw32
  • GEM PATHS:
    • C:/Ruby27-x64/lib/ruby/gems/2.7.0
    • C:/Users/podor/.gem/ruby/2.7.0
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:
  • SHELL PATH:
    • C:\Windows\system32
    • C:\Windows
    • C:\Windows\System32\Wbem
    • C:\Windows\System32\WindowsPowerShell\v1.0\
    • C:\Windows\System32\OpenSSH\
    • C:\Ruby27-x64\bin
    • C:\Users\podor\AppData\Local\Microsoft\WindowsApps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dsisnero@cpruitt@sodabrew@lisbethw1130@unknown-acolyte

        Issue actions

          compatibility problem with latest ruby 2.6 · Issue #1021 · brianmario/mysql2