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

[ruby 3.0 + bundler] rexml not found #1793

Closed
jordansissel opened this issue Jun 15, 2021 · 1 comment · Fixed by #1794
Closed

[ruby 3.0 + bundler] rexml not found #1793

jordansissel opened this issue Jun 15, 2021 · 1 comment · Fixed by #1794

Comments

@jordansissel
Copy link
Owner

/home/jls/projects/fpm/lib/fpm/package/osxpkg.rb:7:in `require': cannot load such file -- rexml/document (LoadError)

This seems to be due to the fact that rexml was moved from a "standard" gem (in ruby 2.x) to a "bundled" gem (in ruby 3.x).

A fix for this is to add rexml as a dependency in the gemspec.

@jordansissel
Copy link
Owner Author

Test cases for this:

Fails on 3.0.1 w/ bundler

% (rbenv shell 3.0.1; bundle install; bundle exec bin/fpm -s empty -t empty -n example)
...
/home/jls/projects/fpm/lib/fpm/package/osxpkg.rb:7:in `require': cannot load such file -- rexml/document (LoadError)

Working on 2.7.0 w/ bundler

% (rbenv shell 2.7.0; bundle install; bundle exec bin/fpm -s empty -t empty -n example)
Your package has gone into the void. {:level=>:warn}
Created package {:path=>""}

jordansissel added a commit that referenced this issue Jun 15, 2021
Previously, rexml was included standard in Ruby. However, in 3.0.0, ruby
moved this library to be a "bundled gem", per the release notes:

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/

> The following default gems are now bundled gems.
> * rexml

Tested on Ruby 2.7.0 and 3.0.1 w/ bundler and it works.

```
% (rbenv shell 3.0.1; bundle install; bundle exec bin/fpm -s empty -t empty -n example)
% (rbenv shell 2.7.0; bundle install; bundle exec bin/fpm -s empty -t empty -n example)
```

Fixes #1793
jordansissel added a commit that referenced this issue Jun 15, 2021
Previously, rexml was included standard in Ruby. However, in 3.0.0, ruby
moved this library to be a "bundled gem", per the release notes:

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/

> The following default gems are now bundled gems.
> * rexml

Tested on Ruby 2.7.0 and 3.0.1 w/ bundler and it works.

```
% (rbenv shell 3.0.1; bundle install; bundle exec bin/fpm -s empty -t empty -n example)
% (rbenv shell 2.7.0; bundle install; bundle exec bin/fpm -s empty -t empty -n example)
```

Fixes #1793
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

Successfully merging a pull request may close this issue.

1 participant