Hello,
I’ve tried so many things, I just can’t seem to be able to run rails new
.
I’m getting this error:
Installing psych 5.1.1.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/asdf/.local/share/gem/ruby/3.1.0/gems/psych-5.1.1.1/ext/psych
/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/bin/ruby extconf.rb
checking for yaml.h... no
yaml.h not found
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
I’m using the following systemPackages with 23.11:
ruby
gnumake
gcc
libyaml # I've tried with and without this one
package configuration for yaml-0.1 is not found
find_header: checking for yaml.h... -------------------- no
LD_LIBRARY_PATH=.:/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/lib "gcc -o conftest -I/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/include/ruby-3.1.0/x86_64-linux -I/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/include/ruby-3.1.0/ruby/backward -I/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/include/ruby-3.1.0 -I. -O3 -fPIC conftest.c -L. -L/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/lib -Wl,-rpath,/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/lib -L/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/lib -lruby-3.1.4 -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
LD_LIBRARY_PATH=.:/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/lib "gcc -I/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/include/ruby-3.1.0/x86_64-linux -I/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/include/ruby-3.1.0/ruby/backward -I/nix/store/2kw126cy93rix4pmh9lcl120njnb6r7r-ruby-3.1.4/include/ruby-3.1.0 -I. -O3 -fPIC -c conftest.c"
conftest.c:3:10: fatal error: yaml.h: No such file or directory
3 | #include <yaml.h>
| ^~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <yaml.h>
/* end */
--------------------
Thank you for any help!