oneclick / rubyinstaller2

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

Jekyll is not installed on Windows 11 #356

Closed fachryip closed 10 months ago

fachryip commented 10 months ago

What problems are you experiencing?

Cannot install Jekyll on Windows 11

Steps to reproduce

On Jekyll Docs on step 3 jeykll failed to install

D:\ProgramFiles\Android\Sdk\platform-tools>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:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c
C:/Program\ Files/Ruby32-x64/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory: C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230906-17400-b41mpw sitelibdir\=./.gem.20230906-17400-b41mpw clean

current directory: C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230906-17400-b41mpw sitelibdir\=./.gem.20230906-17400-b41mpw
generating ffi_c-x64-mingw-ucrt.def
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `mkdir -p "/c/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c/libffi-x64-mingw-ucrt" ""/c/Program(D)"'
make: *** [libffi.mk:6: "/c/Program] Error 2

make failed, exit code 2

Gem files will remain installed in C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5 for inspection.
Results logged to C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/ffi-1.15.5/gem_make.out

What's the output from ridk version?

D:\ProgramFiles\Android\Sdk\platform-tools>ridk version
---
ruby:
  path: C:/Program Files/Ruby32-x64
  version: 3.2.2
  platform: x64-mingw-ucrt
ruby_installer:
  package_version: 3.2.2-1
  git_commit: 83df213
msys2:
  path: C:\Program Files\Ruby32-x64\msys64
cc: gcc (Rev10, Built by MSYS2 project) 12.2.0
sh: GNU bash, version 5.2.15(1)-release (x86_64-pc-msys)
os: Microsoft Windows [Version 10.0.22621.2215]

I also cannot install ffi

D:\ProgramFiles\Android\Sdk\platform-tools>gem install ffi
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing ffi:
        ERROR: Failed to build gem native extension.

    current directory: C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c
C:/Program\ Files/Ruby32-x64/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory: C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230906-21292-iegw90 sitelibdir\=./.gem.20230906-21292-iegw90 clean

current directory: C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230906-21292-iegw90 sitelibdir\=./.gem.20230906-21292-iegw90
generating ffi_c-x64-mingw-ucrt.def
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `mkdir -p "/c/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5/ext/ffi_c/libffi-x64-mingw-ucrt" ""/c/Program(D)"'
make: *** [libffi.mk:6: "/c/Program] Error 2

make failed, exit code 2

Gem files will remain installed in C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ffi-1.15.5 for inspection.
Results logged to C:/Program Files/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/ffi-1.15.5/gem_make.out

my ruby version

D:\ProgramFiles\Android\Sdk\platform-tools>ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]
mohits commented 10 months ago

It is not a common choice to install Ruby into C:\Program Files which you are doing. I also think we have seen some cases of issues with general installation of some Ruby things if Ruby is installed to a path that has a space in it.

It's quite common to install Ruby into folders such as c:\ruby32-x64 - do you think it's possible to try installing Ruby there?

I have some instructions on my site here:

Hope this helps.

fachryip commented 10 months ago

After I change the installation directory, I can install Jekyll. Thank you for your help.