title: Undefined method `escape' for URI:Module
body: <p>I'm a noob studying Ruby on Rails. I am trying to integrate my ruby on rails app to Quickbooks. I'm following the steps of <a href="https://minimul.com/integrating-rails-and-quickbooks-online-via-the-version-3-api-part-1.html" rel="nofollow noreferrer">this video</a>. And I am stuck when I try to authenticate by pressing the &quot;Connect to QuickBooks&quot; button.</p>
  <p><a href="https://i.stack.imgur.com/LRW3w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LRW3w.png" alt="enter image description here" /></a></p>
  <p>I get this error;</p>
  <p><a href="https://i.stack.imgur.com/3uWAM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3uWAM.png" alt="enter image description here" /></a></p>
  <p>I did a little research and found out that this error was about the <code>URI.escape()</code> command. I think they removed it in Ruby 3. How can I resolve this issue? I can't even figure out where this <code>URI.escape()</code> command is located.</p>
  <p>This is from <code>vendors_controller.rb</code></p>
  <pre><code>def authenticate
      callback = oauth_callback_vendors_url
      token = $qb_oauth_consumer.get_request_token(:oauth_callback =&gt; callback)
      session[:qb_request_token] = token
      # If Rails &gt;= 4.1 you need to do this =&gt; session[:qb_request_token] = Marshal.dump(token)   
      redirect_to(&quot;https://appcenter.intuit.com/Connect/Begin?oauth_token=#{token.token}&quot;) and return
    end
  
    def oauth_callback
      at = session[:qb_request_token].get_access_token(:oauth_verifier =&gt; params[:oauth_verifier])
      # If Rails &gt;= 4.1 you need to do this =&gt;  at = Marshal.load(session[:qb_request_token]).get_access_token(:oauth_verifier =&gt; params[:oauth_verifier])
      session[:token] = at.token
      session[:secret] = at.secret
      session[:realm_id] = params['realmId']
      redirect_to root_url, notice: &quot;Your QuickBooks account has been successfully linked.&quot;
    end
  </code></pre>
  <p>My initializer <code>quickbooks.rb</code></p>
  <pre><code>QB_KEY = &quot;I PASTED MY CLIENT ID KEY HERE&quot;
  QB_SECRET = &quot;I PASTED MY CLIENT SECRET HERE&quot;
  
  $qb_oauth_consumer = OAuth::Consumer.new(QB_KEY, QB_SECRET, {
      :site                 =&gt; &quot;https://oauth.intuit.com&quot;,
      :request_token_path   =&gt; &quot;/oauth/v1/get_request_token&quot;,
      :authorize_url        =&gt; &quot;https://appcenter.intuit.com/Connect/Begin&quot;,
      :access_token_path    =&gt; &quot;/oauth/v1/get_access_token&quot;
  })
  
  </code></pre>
  <p>My rails version <code>Rails 6.1.4</code>
  My ruby version <code>ruby 3.0.1p64</code></p>
  <p>Thank you for your time.</p>