title: NoMethodError: undefined method `new' for BigDecimal:Class
body: <p>Recently I have updated <strong>Ruby(2.5.3 to 2.7.1)</strong> and <strong>Ruby on rails(5.2.2 to 6.1.1)</strong> version.</p>
  <p>After that when I run <strong>rspec</strong>, I got this error:</p>
  <pre><code>Failure/Error: require File.expand_path(&quot;../../config/environment&quot;, __FILE__)
  NoMethodError:
    undefined method `new' for BigDecimal:Class
  # ./config/application.rb:11:in `&lt;top (required)&gt;'
  # ./config/environment.rb:2:in `&lt;top (required)&gt;'
  </code></pre>
  <p>An error occurred in spec_helper.rb
  How to debug spec_helper's code which is:</p>
  <pre><code>require File.expand_path(&quot;../../config/environment&quot;, __FILE__)
  </code></pre>
  <p>how to resolve the above error?
  I'm not sure which gem/file trying to do <code>BigDecimal.new</code></p>