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

LoadError (cannot load such file -- rexml/xpath_parser) #598

Open
PaulBabka opened this issue May 9, 2023 · 2 comments
Open

LoadError (cannot load such file -- rexml/xpath_parser) #598

PaulBabka opened this issue May 9, 2023 · 2 comments

Comments

@PaulBabka
Copy link

Thanks for this GEM.

Code has been running fine for years, but when I recently upgraded my app to Ruby 3.2.2 and this GEM to 2.0.2, I ran into the above error in some use cases.

I half-assed solved this error by simply adding REXML to my Gemfile, but should not have needed to.

gem 'rexml'

I don't think this is a QUICKBOOKS-RUBY issue per-say, so feel free to close this issue, but it might help someone else.

# Sample code causing the above error
Quickbooks::Service::Vendor.new(company_id: 'SOME COMPANY ID', access_token: 'SOME ACCESS TOKEN').find_by(:display_name, 'SOME VENDOR')

REXML should have been included by default (ROXML GEM requirement), but for some reason, its not available (at least for me).

Cheers

@kluzny
Copy link

kluzny commented May 9, 2023

This just happened to me as well on ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]

Curiously, I only see this on recent docker image builds. I suspect the rexml is sitting at 3.2.5 in my gemfile due to development dependencies that may be more up to date.

I suspect that the only difference is that including it in the gemfile directly calls 'require'. I can do a bit more research in a day or two, but I suspect that explicitly requiring this in the code paths that are using this gem might be a more concise solution.

For me, this didn't happen during the grant/callback process but during customer creation, likely when it was juggling all that xml.

@adrianne-jetpack
Copy link

We started seeing this issue after we bumped to 2.0.5 from 2.0.4 on July 26, 2024. We've taken the corrective action listed above and explicitly require rexml in our gem file. We appreciated very much finding this issue here as it helped us resolve the issue more quickly.

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

3 participants