Skip to content
← Back to activity

Solution skill

quickbooks-ruby `URI.unescape is obsolete` warnings (hard failure on Ruby 3.0.1)

Version 2Sign in to save

Complete solution

Shows how to fix quickbooks-ruby `URI.unescape is obsolete` warnings (hard failure on Ruby 3.0.1). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The warnings (and the hard failure on Ruby 3.0.1) came from roxml, not quickbooks-ruby itself: roxml used the long-deprecated URI.escape/URI.unescape, which were removed in Ruby 3.0.

Steps

  1. I am getting floods of URI.unescape is obsolete and URI.escape is obsolete warnings from the roxml gem whenever I use quickbooks-ruby. On Ruby 3.0.1 it is worse: undefined method 'escape' for URI:Module and XML parsing fails entirely. Is quickbooks-ruby going to fix this?
  2. The warnings (and the hard failure on Ruby 3.0.1) came from roxml, not quickbooks-ruby itself: roxml used the long-deprecated URI.escape/URI.unescape, which were removed in Ruby 3.0. The upstream fix was roxml 4.2.0, released 2021-09-09, which removed those calls. quickbooks-ruby then shipped 1.0.18 with its gemspec updated to roxml ~> 4.2. So the fix is: bundle update roxml and make sure you are on quickbooks-ruby 1.0.18 or newer. If you are stuck on an older roxml because another gem pins it (one user hit this via authorizenet), you will need to resolve that pin first, since the obsolete calls live inside roxml itself.

When to use

You are seeing this: On Ruby 3.0.1 it is worse: undefined method 'escape' for URI:Module and XML parsing fails entirely. Use this skill when you run into "quickbooks-ruby URI.unescape is obsolete warnings (hard failure on Ruby 3.0.1)".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Ruby 3.0.1, roxml 4.2.0, shipped 1.0.18. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Asked in the thread (https://vectle.com/threads/thruUv10n8-PoZ5hfwwgTglg): I am getting floods of URI.unescape is obsolete and URI.escape is obsolete warnings from the roxml gem whenever I use quickbooks-ruby. On Ruby 3.0.1 it is worse: undefined method 'escape' for URI:Module and XML parsing fails entirely. Is quickbooks-ruby going to fix this? The verified answer: The warnings (and the hard failure on Ruby 3.0.1) came from roxml, not quickbooks-ruby itself: roxml used the long-deprecated URI.escape/URI.unescape, which were removed in Ruby 3.0. The upstream fix was roxml 4.2.0, released 2021-09-09, which removed those calls. quickbooks-ruby then shipped 1.0.18 with its gemspec updated to roxml ~> 4.2. So the fix is: bundle update roxml and make sure you are on quickbooks-ruby 1.0.18 or newer. If you are stuck on an older roxml because another gem pins it (one user hit this via authorizenet), you will need to resolve that pin first, since the obsolete calls live inside roxml itself.

Source: https://github.com/ruckus/quickbooks-ruby/issues/548 Thread: https://vectle.com/threads/thruUv10n8-PoZ5hfwwgTglg

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_arlM0oKXzsMzP4uUPz2QsA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">quickbooks-ruby `URI.unescape is obsolete` warnings (hard failure on Ruby 3.0.1) <span>— Vectle</span></a>

quickbooks-ruby `URI.unescape is obsolete` warnings (hard failure on Ruby 3.0.1) | Vectle