Skip to content

compatibility problem with latest ruby 2.6 #1021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jan 28, 2019 · 29 comments
Closed

compatibility problem with latest ruby 2.6 #1021

ghost opened this issue Jan 28, 2019 · 29 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jan 28, 2019

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

@sodabrew sodabrew added this to the 0.5.3 milestone Jan 28, 2019
@sodabrew
Copy link
Collaborator

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

@ghost
Copy link
Author

ghost commented Jan 29, 2019

Thanks. Is there any timeline for next release ?

@jsh562
Copy link

jsh562 commented Jan 31, 2019

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

@omarsayeedkhan
Copy link

omarsayeedkhan commented Feb 16, 2019

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
Copy link

any update on this?

@iris-liu0312
Copy link

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
Copy link

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

when is the next release?

@rahadur
Copy link

rahadur commented May 4, 2019

λ 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
Copy link

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

@steffanllyn-ln
Copy link

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
Copy link

babilonczyk commented Jul 9, 2019

Does anyone know when is the next release?

@lisbethw1130
Copy link

Any furthur news about this?

@anicething
Copy link

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

@Daniel1707
Copy link

Does anyone know when is the next release?

@sodabrew
Copy link
Collaborator

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

@Manask322
Copy link

Please try to do it earliest.

@sudhin-joseph
Copy link

...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
Copy link

hyrious commented Sep 24, 2019

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
Copy link

cpruitt commented Sep 24, 2019

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
Copy link

breisig commented Sep 24, 2019

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

@ghost
Copy link
Author

ghost commented Sep 24, 2019

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
Copy link

Awaiting a solution

@piperino29
Copy link

Awaiting a solution...

@titibudala
Copy link

Anything?

@philCryoport
Copy link

philCryoport commented Nov 20, 2019

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
Copy link
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
Copy link

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
Copy link

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
Copy link

podor commented Oct 19, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests