Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Fedora 34: cannot load such file -- rexml/document #1784

Closed
Ambrevar opened this issue May 5, 2021 · 8 comments
Closed

Error on Fedora 34: cannot load such file -- rexml/document #1784

Ambrevar opened this issue May 5, 2021 · 8 comments

Comments

@Ambrevar
Copy link

Ambrevar commented May 5, 2021

I've installed fpm in Fedora 34 Docker with

sudo gem install --no-document fpm

When I try to package an .rpm, it yields the following stacktrace:

<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rexml/document (LoadError)
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /usr/local/share/gems/gems/fpm-1.12.0/lib/fpm/package/osxpkg.rb:7:in `<top (required)>'
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /usr/local/share/gems/gems/fpm-1.12.0/lib/fpm.rb:15:in `<top (required)>'
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /usr/local/share/gems/gems/fpm-1.12.0/bin/fpm:4:in `<top (required)>'
	from /usr/local/bin/fpm:23:in `load'
	from /usr/local/bin/fpm:23:in `<main>'

The command I've invoked is

"fpm" "-s" "dir" "-t" "rpm" "--maintainer=Atlas Engineer LLC"
               "--license=BSD 3-Clause"
               "--description=Extensible web-browser in Common Lisp"
               "--url=https://nyxt.atlas.engineer" "--depends=glib-networking"
               "--depends=gsettings-desktop-schemas" "--depends=xclip"
               "--depends=enchant" "--depends=notify-osd" "--depends=glibc"
               "--depends=zlib" "--depends=webkit2gtk3" "--depends=gtk3"
               "--depends=gtk3" "--depends=pango" "--depends=pango"
               "--depends=cairo" "--depends=gdk-pixbuf2" "--depends=glib2"
               "--depends=glib2" "--depends=glib2" "--depends=glib2"
               "--depends=libfixposix-devel" "--depends=openssl-libs" "-n"
               "nyxt" "-v" "2" "nyxt=/usr/bin/"
               "assets/nyxt.desktop=usr/share/applications/"
               "assets/nyxt_16x16.png=usr/share/icons/hicolor/16x16/apps/nyxt.png"
               "assets/nyxt_32x32.png=usr/share/icons/hicolor/32x32/apps/nyxt.png"
               "assets/nyxt_128x128.png=usr/share/icons/hicolor/128x128/apps/nyxt.png"
               "assets/nyxt_256x256.png=usr/share/icons/hicolor/256x256/apps/nyxt.png"
               "assets/nyxt_512x512.png=usr/share/icons/hicolor/512x512/apps/nyxt.png"

Any idea?

@aanno
Copy link

aanno commented May 12, 2021

Did you tried dnf install rubygem-rexml? fpm is a bit tricky to install (but it's running on my f34 machine)...

@Ambrevar
Copy link
Author

Ambrevar commented May 13, 2021 via email

@Kastakin
Copy link

Solved the same issue on an Arch based machine with pacman -S ruby-rexml

@jordansissel
Copy link
Owner

jordansissel commented Jun 15, 2021

Curious -- Are you using ruby 3.0.0 or newer? Ruby made some changes specific to rexml that can cause this error. If you're hitting this error on Ruby 3.0.0 or newer, please let me know here.

I added a fix for Ruby 3.0.0 that should help: #1794

@Ambrevar
Copy link
Author

Ambrevar commented Jun 17, 2021 via email

@Kastakin
Copy link

It seems arch is using a similar version:

https://archlinux.org/packages/extra/x86_64/ruby/

jordansissel added a commit that referenced this issue Nov 3, 2022
This helps avoid a startup crash on Ruby 1.9.3 where the `rexml` gem
crashes when loaded due to syntax errors.

Fixes #1798, #1800, #1784
jordansissel added a commit that referenced this issue Nov 3, 2022
This helps avoid a startup crash on Ruby 1.9.3 where the `rexml` gem
crashes when loaded due to syntax errors.

Fixes #1798, #1800, #1784
jordansissel added a commit that referenced this issue Nov 3, 2022
This helps avoid a startup crash on Ruby 1.9.3 where the `rexml` gem
crashes when loaded due to syntax errors.

Fixes #1798, #1800, #1784
@jordansissel
Copy link
Owner

#1950 merged and should resolve this. Let me know if it's not working :)

jordansissel added a commit that referenced this issue Nov 4, 2022
This helps avoid a startup crash on Ruby 1.9.3 where the `rexml` gem
crashes when loaded due to syntax errors.

Fixes #1798, #1800, #1784
@jordansissel
Copy link
Owner

fpm 1.15.0 is released and, I believe, has resolve this issue. Please let me know if you find otherwise in a new issue (if a new problem) or this issue (if same problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants