oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
645 stars 248 forks source link

Issues with installing jekyll #324

Closed episanty closed 1 year ago

episanty commented 1 year ago

What problems are you experiencing?

I am consistently failing to install jekyll.

Steps to reproduce

Running on Windows 10 Enterprise, version 21H2, build 19044.2364.

I followed the steps on https://jekyllrb.com/docs/installation/windows/

This produces the output below, the highlights from which are

ERROR: Error installing jekyll: ERROR: Failed to build gem native extension.

Nothing I try seems to change it. Full output:

PS C:\Users\username> gem install jekyll
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing jekyll:
        ERROR: Failed to build gem native extension.

    current directory: C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
C:/tools/ruby31/bin/ruby.exe -I C:/tools/ruby31/lib/ruby/3.1.0 -r ./siteconf20221226-26976-2dk681.rb extconf.rb
creating Makefile

current directory: C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
make DESTDIR\= clean
current directory: C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
make DESTDIR\=
make failedNo such file or directory - make

Gem files will remain installed in C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/http_parser.rb-0.8.0 for inspection.
Results logged to C:/tools/ruby31/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/http_parser.rb-0.8.0/gem_make.out

What's the output from ridk version?

System details -- output from ridk version

PS C:\Users\username> ridk version
---
ruby:
  path: C:/tools/ruby31
  version: 3.1.2
  platform: x64-mingw-ucrt
  cc: gcc.exe (Rev10, Built by MSYS2 project) 11.2.0
ruby_installer:
  package_version: 3.1.2-1
  git_commit: 17502f9
msys2:
  path: C:\tools\msys64
sh: GNU bash, version 5.1.16(2)-release (x86_64-pc-msys)
os: Microsoft Windows [Version 10.0.19044.2364]

and from $env:path -split ";"

C:\tools\ruby31\bin
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
M:\pcraster-4.0.2_x86-64\bin
M:\pcraster-4.0.2_x86-64\python
C:\Program Files\Wolfram Research\WolframScript\
C:\Program Files\MiKTeX\miktex\bin\x64\
C:\Program Files\gs\gs9.56.1\bin
C:\Program Files\dotnet\
C:\ProgramData\chocolatey\bin
C:\Users\K2150648\AppData\Local\Ruby31-x64\bin
C:\Ruby31-x64\bin
C:\Users\K2150648\AppData\Local\Microsoft\WindowsApps
C:\Users\K2150648\AppData\Local\Programs\Git\cmd
C:\Users\K2150648\AppData\Local\gitkraken\bin

Happy to provide any further details needed.

larskanis commented 1 year ago

There seems to be a mixture of different installations. You have C:\tools\ruby31\bin and C:\Ruby31-x64\bin, the former is preferred. You sad you're using the Ruby+Devkit flavour, but the MSYS path of ridk version is C:\tools\msys64, which seems not to be the one distributed by Rubyinstaller.

As far as I can tell you can either:

  1. Remove C:\tools\ruby31\bin from the system environment variable PATH in the system settings, so that the Ruby+Devkit installation is used. That should enable the make tool and let you install jekyll.
  2. Or use the C:\tools\ruby31\bin and C:\tools\msys64 directory and make sure, that the necessary tools are installed by running ridk install.
episanty commented 1 year ago

@larskanis Thanks for pointint out this inconsistency. It seems that the remnants of the previous attempts were all fighting each other.

I did my best to sandblast all referenced installations of ruby and msys64 from the system, rebooted, and started from scratch. This seems to have worked, though I'm really not sure why it didn't work the first time.

Thanks for your help, and this seems to be working on my side, so the issue can be closed (or deleted, if that helps keep things cleaner, as I don't think it will provide much value to future users).

larskanis commented 1 year ago

Alright! Have fun with ruby!

episanty commented 1 year ago

already am!