[ruby-talk:444168] gem mysql2 ruby 32, mysql server 8.0

I've been able to use gem mysql2 and an older version of ruby without any problem. Updating both programs I've not been able to get them to work even though I have gone through everything I could find on the internet.

With all the posts that mysql2 doesn't work is there another gem other than mysql2 that works?

Is there something obvious that i am missing?

Thanks

Tom Reilly

C:\Ruby32-x64\bin>gem install mysql2
Using rubygems directory: C:/Users/w3gat/.gem/ruby/3.2.0
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-ucrt-x86_64-libmariadbclient
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
pacman failed with the following output:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.

 current directory: C:/Users/w3gat/\.gem/ruby/3\.2\.0/gems/mysql2\-0\.5\.5/ext/mysql2

C:/Ruby32-x64/bin/ruby.exe -I C:/Ruby32-x64/lib/ruby/3.2.0 extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_gc_mark_movable()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby32-x64/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--without-openssl-dir
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysqlclient-dir
--without-mysqlclient-dir
--with-mysqlclient-include
--without-mysqlclient-include=${mysqlclient-dir}/include
--with-mysqlclient-lib
--without-mysqlclient-lib=${mysqlclient-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)

 paths = paths\.flat\_map \{|path| path\.split\(File::PATH\_SEPARATOR\)\}
                                    ^^^^^^
     from C:/Ruby32\-x64/lib/ruby/3\.2\.0/mkmf\.rb:1083:in \`each'
     from C:/Ruby32\-x64/lib/ruby/3\.2\.0/mkmf\.rb:1083:in \`flat\_map'
     from C:/Ruby32\-x64/lib/ruby/3\.2\.0/mkmf\.rb:1083:in \`find\_library'
     from extconf\.rb:131:in \`<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Users/w3gat/.gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Users/w3gat/.gem/ruby/3.2.0/gems/mysql2-0.5.5 for inspection.
Results logged to C:/Users/w3gat/.gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.5/gem_make.out

C:\Ruby32-x64\bin>cd \ruby32*

···

______________________________________________
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
ruby-talk info -- Info | ruby-talk@ml.ruby-lang.org - ml.ruby-lang.org

Why am I suddenly getting emails from this group. I was blocked by a
previous admin for ruby out of Frisco, TX without cause. Now you suddenly
forgive me for some baffling reason
I am no longer interested in anything from you god damned clowns

···

On Sun, Mar 26, 2023 at 7:44 PM Tom Reilly via ruby-talk < ruby-talk@ml.ruby-lang.org> wrote:

I've been able to use gem mysql2 and an older version of ruby without
any problem. Updating both programs I've not been able to get them to
work even though I have gone through everything I could find on the
internet.

With all the posts that mysql2 doesn't work is there another gem other
than mysql2 that works?

Is there something obvious that i am missing?

Thanks

Tom Reilly

C:\Ruby32-x64\bin>gem install mysql2
Using rubygems directory: C:/Users/w3gat/.gem/ruby/3.2.0
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-ucrt-x86_64-libmariadbclient
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
pacman failed with the following output:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
         ERROR: Failed to build gem native extension.

     current directory:
C:/Users/w3gat/.gem/ruby/3.2.0/gems/mysql2-0.5.5/ext/mysql2
C:/Ruby32-x64/bin/ruby.exe -I C:/Ruby32-x64/lib/ruby/3.2.0 extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_gc_mark_movable()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details.
You may
need configuration options.

Provided configuration options:
         --with-opt-dir
         --without-opt-dir
         --with-opt-include
         --without-opt-include=${opt-dir}/include
         --with-opt-lib
         --without-opt-lib=${opt-dir}/lib
         --with-make-prog
         --without-make-prog
         --srcdir=.
         --curdir
         --ruby=C:/Ruby32-x64/bin/$(RUBY_BASE_NAME)
         --with-openssl-dir
         --without-openssl-dir
         --with-mysql-dir
         --without-mysql-dir
         --with-mysql-include
         --without-mysql-include=${mysql-dir}/include
         --with-mysql-lib
         --without-mysql-lib=${mysql-dir}/lib
         --with-mysql-config
         --without-mysql-config
         --with-mysqlclient-dir
         --without-mysqlclient-dir
         --with-mysqlclient-include
         --without-mysqlclient-include=${mysqlclient-dir}/include
         --with-mysqlclient-lib
         --without-mysqlclient-lib=${mysqlclient-dir}/lib
         --with-mysqlclientlib
         --without-mysqlclientlib
C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `block in find_library':
undefined method `split' for nil:NilClass (NoMethodError)

     paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
                                        ^^^^^^
         from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `each'
         from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `flat_map'
         from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `find_library'
         from extconf.rb:131:in `<main>'

To see why this extension failed to compile, please check the mkmf.log
which can be found here:

C:/Users/w3gat/.gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/Users/w3gat/.gem/ruby/3.2.0/gems/mysql2-0.5.5 for inspection.
Results logged to

C:/Users/w3gat/.gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.5/gem_make.out

C:\Ruby32-x64\bin>cd \ruby32*

______________________________________________
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
ruby-talk info --
Info | ruby-talk@ml.ruby-lang.org - ml.ruby-lang.org