title: Undefined method `has?' for Sass::Util:Module (NoMethodError) - Error on Debian with Ruby, Sass, Compass
body: <p>I searched for a solution to the following problem, but I couldn't find anything. So I hoped that you could help me. Thank you.</p>
  
  <p>I have:</p>
  
  <ul>
  <li><strong>Debian Stretch</strong> (distro: <code>Debian GNU/Linux 9.7</code>, kernel: <code>Linux 4.9.0-8-amd64 (x86_64)</code>);</li>
  <li><strong>Apache NetBeans 10 (incubating)</strong> - the snap installed from <a href="https://snapcraft.io/netbeans" rel="nofollow noreferrer">https://snapcraft.io/netbeans</a>;</li>
  <li><strong>PHP 7.1</strong>.</li>
  </ul>
  
  <p><br/>
  I installed (by inspiring myself from <a href="https://blog.42mate.com/how-to-install-compass-on-debian/" rel="nofollow noreferrer">this</a> page:</p>
  
  <ul>
  <li><strong>Ruby</strong> (with: <code>sudo apt install ruby-full</code>);</li>
  <li><strong>Sass</strong> (with <code>sudo gem install sass</code>);</li>
  <li><strong>Compass</strong> (with <code>sudo gem install compass</code>);</li>
  </ul>
  
  <p>and checked their versions:</p>
  
  <pre><code># ruby --version
  ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
  
  # sass --version
  Ruby Sass 3.7.3
  
  # compass --version
  Compass 1.0.3 (Polaris)
  Copyright (c) 2008-2019 Chris Eppstein
  </code></pre>
  
  <p>Please note that I have null experience with Ruby.</p>
  
  <p><br/>
  I have the following <strong>NetBeans settings</strong>:</p>
  
  <p>*) In the tab <em>"Tools > Options > HTML/JS > CSS Preprocessors"</em>:</p>
  
  <pre><code>Sass Path: /usr/local/bin/sass
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>Sass Path: /usr/local/bin/scss
  </code></pre>
  
  <p>*) In the tab <em>"File > Project Properties > CSS Preprocessors > Sass"</em>:</p>
  
  <pre><code>Input: /web/src/Application/assets/scss
  Output: /web/public/assets/css
  Compiler Options: --compass -E "UTF-8" --trace --no-cache
  </code></pre>
  
  <p><br/>
  <strong>Backtrace:</strong></p>
  
  <p>When I tried to compile the <em>.scss</em> files (in order to create the corresponding <em>.css</em> files) I received an error for each of them. This is the backtrace for the first <em>.scss</em> file:</p>
  
  <pre><code>"/usr/local/bin/sass" "--cache-location" "/home/&lt;my-username&gt;/snap/netbeans/common/cache/10.0/sass-compiler" "--sourcemap=none" "--compass" "-E" "UTF-8" "--trace" "--no-cache" "&lt;my-path-to-project-root&gt;/web/src/Application/assets/scss/fonts.scss" "&lt;my-path-to-project-root&gt;/web/public/assets/css/fonts.css"
  /var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:5:in `has?': undefined method `has?' for Sass::Util:Module (NoMethodError)
  Did you mean?  hash
                 Hash
      from /var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:9:in `included'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/lib/sass/script/functions.rb:627:in `include'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/lib/sass/script/functions.rb:627:in `include'
      from /var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions.rb:23:in `&lt;module:Functions&gt;'
      from /var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions.rb:19:in `&lt;top (required)&gt;'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions.rb:9:in `&lt;top (required)&gt;'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core.rb:68:in `&lt;top (required)&gt;'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /var/lib/gems/2.3.0/gems/compass-1.0.3/lib/compass.rb:14:in `block in &lt;top (required)&gt;'
      from /var/lib/gems/2.3.0/gems/compass-1.0.3/lib/compass.rb:13:in `each'
      from /var/lib/gems/2.3.0/gems/compass-1.0.3/lib/compass.rb:13:in `&lt;top (required)&gt;'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
      from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/lib/sass/exec/sass_scss.rb:238:in `load_compass'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/lib/sass/exec/sass_scss.rb:49:in `process_result'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/lib/sass/exec/base.rb:50:in `parse'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/lib/sass/exec/base.rb:18:in `parse!'
      from /var/lib/gems/2.3.0/gems/sass-3.7.3/bin/sass:13:in `&lt;top (required)&gt;'
      from /usr/local/bin/sass:22:in `load'
      from /usr/local/bin/sass:22:in `&lt;main&gt;'
  Done.
  </code></pre>
  
  <p><br/>
  <strong><em>urls.rb</em> file</strong>:</p>
  
  <p>This is the beginning content of the file specified in the backtrace (<em>/var/lib/gems/2.3.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb</em>):</p>
  
  <pre><code>module Compass::Core::SassExtensions::Functions::Urls
  
  
    def self.has?(base, instance_method)
      Sass::Util.has?(:instance_method, base, instance_method)
    end
  
    def self.included(base)
      base.send(:include, StylesheetUrl) unless has?(base, :stylesheet_url)
      base.send(:include, FontUrl) unless has?(base, :font_url)
      base.send(:include, ImageUrl) unless has?(base, :image_url)
      base.send(:include, GeneratedImageUrl) unless has?(base, :generated_image_url)
    end
  </code></pre>