Jump to content

[Solved] Ruby - Bundle Install failure ("yaml.h" missing?)


sz13

Recommended Posts

Running "bundle install" for my Ruby on Rails project (using the button on the Rails App page in Plesk), and after running awhile, I eventually get the following error:

...

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/psych-5.1.2/ext/psych
/opt/plesk/ruby/3.2.2/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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/plesk/ruby/3.2.2/bin/$(RUBY_BASE_NAME)
--with-libyaml-source-dir
--without-libyaml-source-dir
--with-yaml-0.1-dir
--without-yaml-0.1-dir
--with-yaml-0.1-include
--without-yaml-0.1-include=${yaml-0.1-dir}/include
--with-yaml-0.1-lib
--without-yaml-0.1-lib=${yaml-0.1-dir}/lib64
--with-yaml-0.1-config
--without-yaml-0.1-config
--with-pkg-config
--without-pkg-config
--with-libyaml-dir
--without-libyaml-dir
--with-libyaml-include
--without-libyaml-include=${libyaml-dir}/include
--with-libyaml-lib
--without-libyaml-lib=${libyaml-dir}/lib64
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0-static/psych-5.1.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/psych-5.1.2 for
inspection.
Results logged to
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0-static/psych-5.1.2/gem_make.out
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/ext/builder.rb:119:in `run'
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:27:in
`build'
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/ext/builder.rb:187:in
`build_extension'
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/ext/builder.rb:221:in `block
in build_extensions'
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/ext/builder.rb:218:in `each'
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/ext/builder.rb:218:in
`build_extensions'
/opt/plesk/ruby/3.2.2/lib64/ruby/3.2.0/rubygems/installer.rb:843:in
`build_extensions'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/source/rubygems.rb:205:in
`install'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/gem_installer.rb:54:in
`install'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:62:in
`apply_func'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:57:in
`block in process_queue'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:54:in
`loop'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:54:in
`process_queue'
/home/sigma013.heliohost.org/vendor/bundle/ruby/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'
An error occurred while installing psych (5.1.2), and Bundler cannot continue.
In Gemfile:
debug was resolved to 1.9.1, which depends on
irb was resolved to 1.12.0, which depends on
rdoc was resolved to 6.6.2, which depends on
psych
ERROR:__main__:Command '['/usr/local/psa/admin/sbin/filemng', 'sigma013', 'exec', '/home/sigma013.heliohost.org/', '/bin/bash', '-l', '-c', 'bundle install --path vendor/bundle']' returned non-zero exit status 5.

Is there anything I need to do to have `yaml.h` installed?  This particular ruby app is pretty much using the default rails setup, and the `psych` gem seems to be part of it.

Thanks in advance!

 

My subdomain is `sigma013` on Tommy

Link to comment
Share on other sites

It looks like the dependency libyaml-devel was missing to build the yaml gem. I installed that and then tried the bundle install and it appears to have worked now. Let us know if you are still having issues with Ruby.

Link to comment
Share on other sites

  • Krydos changed the title to [Solved] Ruby - Bundle Install failure ("yaml.h" missing?)
  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...