Error installing jekyll
benjamrio opened this issue · 7 comments
What problems are you experiencing?
Following the official installation documentation, installing jekyll with gem fails and returns an error.
Steps to reproduce
I am on Windows 11
https://jekyllrb.com/docs/installation/windows/
What's the output from ridk version
?
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:/Users/benja/.local/share/gem/ruby/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:/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230824-18936-zolflu sitelibdir\=./.gem.20230824-18936-zolflu clean
bash.exe: warning: could not find /tmp, please create!
current directory: C:/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230824-18936-zolflu sitelibdir\=./.gem.20230824-18936-zolflu
generating ffi_c-x64-mingw-ucrt.def
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
Configuring libffi
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
configure: WARNING: cache variable lt_cv_path_LD contains a newline
configure: WARNING: cache variable lt_cv_path_LDCXX contains a newline
bash.exe: warning: could not find /tmp, please create!
configure: WARNING: cache variable lt_cv_path_LD contains a newline
configure: WARNING: cache variable lt_cv_path_LDCXX contains a newline
make -C "/c/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/libffi-x64-mingw-ucrt"
bash.exe: warning: could not find /tmp, please create!
make[1]: Entering directory '/c/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/libffi-x64-mingw-ucrt'
Makefile:420: *** missing separator. Stop.
make[1]: Leaving directory '/c/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/libffi-x64-mingw-ucrt'
make: *** [libffi.mk:9: "/c/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/libffi-x64-mingw-ucrt"/.libs/libffi_convenience.a] Error 2
make failed, exit code 2
Gem files will remain installed in C:/Users/benja/.local/share/gem/ruby/3.2.0/gems/ffi-1.15.5 for inspection.
Results logged to C:/Users/benja/.local/share/gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/ffi-1.15.5/gem_make.out
-
I just cleared all my gems installed on Ruby 3.2, and jekyll correctly installed.
-
I believe the template asked for the output of
ridk version
. Please post the output. -
Why are the following two paths accessible? If you've got multiple build tools installed, you need to be aware of conflicts between them...
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
Thank you for your help
- I already tried to do a clean reinstall
bash.exe: warning: could not find /tmp, please create!
---
ruby:
path: C:/Program Files/Ruby32-x64
version: 3.2.2
platform: x64-mingw-ucrt
cc: gcc.exe (Rev10, Built by MSYS2 project) 12.2.0
ruby_installer:
package_version: 3.2.2-1
git_commit: 83df213
msys2:
path: C:\Program Files\Ruby32-x64\msys64
cc: gcc (Rev2, Built by MSYS2 project) 13.2.0
sh: GNU bash, version 5.2.15(1)-release (x86_64-pc-msys)
os: Microsoft Windows [Version 10.0.22621.2134]
- I am on Windows and these paths don't exist, I think it is just checking some default paths
No clue why this happens, but try
ridk exec mkdir /tmp
Edit: I'm starting to suspect this problem:
https://stackoverflow.com/a/73700301
When executing this command on Command Prompt, I obtain an error : The syntax of the command is incorrect.
.
Otherwise, I do have /tmp folder inside the Git folder. Also my command prompt finds well the ridk command but git bash does not.
Hi @benjamrio - I noticed that your Ruby is installed to: "C:\Program Files\Ruby32-x64\msys64" which has a space in the path and some things don't work well with a space in the Ruby installation path.
Could you try installing it to a path such as C:\Ruby32-x64\ and trying? That's helped a few people already.
Hope this helps.
If it's already sorted, would you please close the issue? Thanks!
It is sorted now, thank you for the advice. Also jekyll is only available on command prompt and not in bash.
Thanks for confirming that it works now. I will close the issue.