Phusion error: undefined `has? 'for Sass :: Util: Module

When loading a webpage, I get the following error released by Phusion:

There was an error while trying to load the gem 'compass-rails'.
Gem Load Error is: undefined method `has?' for Sass::Util:Module
Did you mean?  hash
               Hash
Backtrace for gem load error is:
/Volumes/Data/htdocs/zetcho/vendor/bundle/gems/compass-0.12.2/lib/compass/sass_extensions/functions/urls.rb:5:in `has?'

Code in the specified location:

module Compass::SassExtensions::Functions::Urls


def self.has?(base, instance_method)
  Sass::Util.has?(:instance_method, base, instance_method)
end

My gem file contains:

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.2'

# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.3.18'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'

# Use Compass for stylesheets
gem 'compass-rails'

# Use the Compass extension susy
gem "sprockets"
gem 'susy'

I just created a Ruby on Rails website using Rails 5.1.2 and ruby โ€‹โ€‹2.3.1. I have a much older site that works fine with gemstone. Am I missing a step in the general installation or is it a compass rails error?

I have the same error when I tried to add a controller:

rails generate controller home index
+6
source share
3 answers

After repeated searches, I found a similar problem. I fixed this by modifying the gem file:

gem 'compass-rails', github: 'Compass/compass-rails'

Then:

rm gemfile.lock
bundle
+9
source

, compass-rails 2.0.0. 3.0.2, , . , :

# Gemfile
gem 'compass-rails', '~> 3.0.2'

bundle update compass-rails

- git .

+3

, , Compass/Sass. - , , Sass (sass-3.7.4), - , sass:

gem uninstall sass

, , , , .

gem install compass
0

Source: https://habr.com/ru/post/1682078/


All Articles