I’m trying to set up Rails on my Windows 11 computer on a Snapdragon(R) X 12-core X1E80100 computer. When I try to create a new project, the rails new statement fails (output and make file logs below) –
The system points to C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/psych-5.1.2/mkmf.log, which is looking for yaml.h:
I’m just installing Ruby, restarting, installing the rails gem, using rails new to create my app, and it fails.
Any ideas what/s going wrong? Thank you!
Installing psych 5.1.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
…and later…
An error occurred while installing psych (5.1.2), and Bundler cannot continue.
In Gemfile:
debug was resolved to 1.9.2, which depends on
irb was resolved to 1.14.0, which depends on
rdoc was resolved to 6.7.0, which depends on
psych
run bundle lock --add-platform=x86_64-linux
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Writing lockfile to C:/Users/TomMo/Code/Journaley/Gemfile.lock
run bundle binstubs bundler
Could not find debug-1.9.2, irb-1.14.0, rdoc-6.7.0, psych-5.1.2 in locally
PATH=".;C:/Ruby32-x64/lib;C:Ruby32-x64bin;C:Ruby32-x64msys64ucrt64bin;C:Ruby32-x64msys64usrbin;C:Program FilesCommon FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program FilesGitcmd;C:Program FilesMicrosoft SQL Server150ToolsBinn;C:Program FilesMicrosoft SQL ServerClient SDKODBC170ToolsBinn;C:Program Filesdotnet;C:Ruby32-x64bin;C:UsersTomMoAppDataLocalMicrosoftWindowsApps;C:UsersTomMoAppDataLocalProgramsMicrosoft VS Codebin;C:UsersTomMo.dotnettools" x86_64-w64-mingw32-pkg-config --exists yaml-0.1
package configuration for yaml-0.1 is not found
find_header: checking for yaml.h... -------------------- no
PATH=".;C:/Ruby32-x64/lib;C:Ruby32-x64bin;C:Ruby32-x64msys64ucrt64bin;C:Ruby32-x64msys64usrbin;C:Program FilesCommon FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program FilesGitcmd;C:Program FilesMicrosoft SQL Server150ToolsBinn;C:Program FilesMicrosoft SQL ServerClient SDKODBC170ToolsBinn;C:Program Filesdotnet;C:Ruby32-x64bin;C:UsersTomMoAppDataLocalMicrosoftWindowsApps;C:UsersTomMoAppDataLocalProgramsMicrosoft VS Codebin;C:UsersTomMo.dotnettools" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -DYAML_DECLARE_STATIC -O3 -fno-fast-math -fstack-protector-strong conftest.c -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed -m64 -lx64-ucrt-ruby320 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return !!argv[argc];
8: }
/* end */
PATH=".;C:/Ruby32-x64/lib;C:Ruby32-x64bin;C:Ruby32-x64msys64ucrt64bin;C:Ruby32-x64msys64usrbin;C:Program FilesCommon FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program FilesGitcmd;C:Program FilesMicrosoft SQL Server150ToolsBinn;C:Program FilesMicrosoft SQL ServerClient SDKODBC170ToolsBinn;C:Program Filesdotnet;C:Ruby32-x64bin;C:UsersTomMoAppDataLocalMicrosoftWindowsApps;C:UsersTomMoAppDataLocalProgramsMicrosoft VS Codebin;C:UsersTomMo.dotnettools" "gcc -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -DYAML_DECLARE_STATIC -O3 -fno-fast-math -fstack-protector-strong -m64 -c conftest.c"
conftest.c:5:10: fatal error: yaml.h: No such file or directory
5 | #include <yaml.h>
| ^~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <yaml.h>
/* end */
--------------------
I searched online for a solution. I tried explicitly installing the psych gem , and that fails as well.
Tom Moseley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.