4/13/2024 0 Comments Mysql essential download windows 7Installing ri documentation for mysql2-0.5.5ĭone installing documentation for mysql2 after 2 seconds Using msys2 packages: mingw-w64-i686-libmariadbclientīuilding native extensions with: '-with-mysql-dir=c:/Rub圓2/msys32/mingw32' Temporarily enhancing PATH for MSYS/MINGW. Large printout of Ruby Installer 2 for WindowsĬ:\Windows\System32>gem install mysql2 -platform=ruby -with-mysql-dir=c:/Rub圓2/msys32/mingw32 Thank you I tried many other methods over the last 2 days. Make sure that you specify the right path to Ruby installed in your computer.I suspect there are some quoting and/or parsing issues somewhere (maybe paths containing spaces are part of the problem ?)įrom that cmd, run gem install mysql2 -platform=ruby -with-mysql-dir=c:/your/path/to/Ruby27-圆4/msys64/mingw64 When it is followed by a space, the build fails. When the subsequent text -with-xxxx is followed by an equal sign then the build succeed. I have also noticed to that a consistent predictor of a failed build is the second line that starts withīuilding native extensions with. That ended up with a different build failure (in line 1050 of mkmf.rb rather than 1771). (I tried various -with-xxxx switches without success)Īlso note that I tried to build with gem install mysql2 -platform=ruby -use-system-libraries as suggested in the article linked above. I have not found how to link the DLL shipped with the C connector. I believe this is because MariaDB stuff gets linked to the resulting mysql2.so no matter what (it gets forcibly installed too if missing). However, that gem is not usable: I get a runtime error when require 'mysql2' is executed: Incorrect MySQL client library version! This gem was compiled for 6.1.11 but the client library is 10.5.5.From that cmd, run gem install mysql2 -platform=ruby -with-mysql-dir=c:/your/path/to/mysql-connector-c-6.1.11-win圆4 (no particular quote was needed and I used forward slashes).Start a cmd terminal and run ridk explicitely as step 1 above.Unzipped in c:\your\path\to\mysql-connector-c-6.1.11-win圆4 (no spaces.This was adapted from this answer )įWIW, I could get a non functional gem to build with the C Connector 6.1.11 by doing so: From that cmd, run gem install mysql2 -platform=ruby -with-mysql-dir=c:/your/path/to/Ruby27-圆4/msys64/mingw64 (no particular quote was neeeded and I used forward slashes.This gives you the right environment to do the rest. Start a cmd terminal and run ridk explicitely ( c:\your\path\to\Ruby27-圆4\ridk.cmd enable). After an entire day of trial and error, I found that I could install a working* mysql2 gem on Ruby 2.7.3 on Windows 10 (*working: at least for basic queries). I got this exact same error in the same line 1771. Results logged to D:/Programs/Ruby/27-圆4/lib/ruby/gems/2.7.0/extensions/圆4-mingw32/2.7.0/mysql2-0.5.3/gem_make.outĪny ideas on how to fix, or is the latest gem version non functional at the moment? I've confirmed that I have the required system libraries present and I've even tried, as per the error message, to point the gem to use the locally installed MariaDB 10.4, but nothing works. Gem files will remain installed in D:/Programs/Ruby/27-圆4/lib/ruby/gems/2.7.0/gems/mysql2-0.5.3 for inspection. To see why this extension failed to compile, please check the mkmf.log which can be found here:ĭ:/Programs/Ruby/27-圆4/lib/ruby/gems/2.7.0/extensions/圆4-mingw32/2.7.0/mysql2-0.5.3/mkmf.log ruby=D:/Programs/Ruby/27-圆4/bin/$(RUBY_BASE_NAME)ĭ:/Programs/Ruby/27-圆4/lib/ruby/2.7.0/mkmf.rb:1771:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError) Check the mkmf.log file for more details. yesĬould not create Makefile due to some reason, probably lack of necessary Using msys2 packages: mingw-w64-x86_64-libmariadbclientīuilding native extensions with: '-with-mysql-dir D:\Programs\MariaDB 10.4'ĮRROR: Failed to build gem native extension.Ĭurrent directory: D:/Programs/Ruby/27-圆4/lib/ruby/gems/2.7.0/gems/mysql2-0.5.3/ext/mysql2ĭ:/Programs/Ruby/27-圆4/bin/ruby.exe -I D:/Programs/Ruby/27-圆4/lib/ruby/2.7.0 -r.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |