I need to have 2 versions of ruby installed for separate projects (2.6.6p146 and 3.3.4).
When I change ruby by using export PATH="...:/c/Ruby33-x64/bin:..."
, ruby -v
reports 3.3.4.
However, gem install psych
fails.
warning: failed to retrieve some fileserror: failed to commit transaction (download library error)ERROR: Error installing psych: ERROR: Failed to build gem native extension. current directory: C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/psych-5.2.0/ext/psychC:/Ruby33-x64/bin/ruby.exe extconf.rbchecking for pkg-config for yaml-0.1... not foundchecking for yaml.h... noyaml.h not found*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers. Check the mkmf.log file for more details. You mayneed configuration options.Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include=${opt-dir}/include --without-opt-include --with-opt-lib=${opt-dir}/lib --without-opt-lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby33-x64/bin/$(RUBY_BASE_NAME) --with-libyaml-source-dir --without-libyaml-source-dir --with-yaml-0.1-dir --without-yaml-0.1-dir --with-yaml-0.1-include=${yaml-0.1-dir}/include --without-yaml-0.1-include --with-yaml-0.1-lib=${yaml-0.1-dir}/lib --without-yaml-0.1-lib --with-yaml-0.1-config --without-yaml-0.1-config --with-pkg-config --without-pkg-config --with-libyaml-dir --without-libyaml-dir --with-libyaml-include=${libyaml-dir}/include --without-libyaml-include --with-libyaml-lib=${libyaml-dir}/lib --without-libyaml-libTo see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby33-x64/lib/ruby/gems/3.3.0/extensions/x64-mingw-ucrt/3.3.0/psych-5.2.0/mkmf.logextconf failed, exit code 1Gem files will remain installed in C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/psych-5.2.0 for inspection.Results logged to C:/Ruby33-x64/lib/ruby/gems/3.3.0/extensions/x64-mingw-ucrt/3.3.0/psych-5.2.0/gem_make.outTemporarily enhancing PATH for MSYS/MINGW...Installing required msys2 packages: mingw-w64-ucrt-x86_64-libyamlpacman failed with the following output:resolving dependencies...looking for conflicting packages...Packages (1) mingw-w64-ucrt-x86_64-libyaml-0.2.5-2Total Download Size: 0.08 MiBTotal Installed Size: 0.38 MiB:: Proceed with installation? [Y/n]:: Retrieving packages... mingw-w64-ucrt-x86_64-libyaml-0.2.5-2-any downloading...Errors occurred, no packages were upgraded.Building native extensions. This could take a while...
I've tried to compile psych from source, and tried uninstalling Ruby 2.6 temporarily. Even without Ruby 2.6, I still see the same error.
I'm using Git bash on Windows 11.