TECH BOX

Technology developer's blog

この記事は1年以上経過しています

Sass3.5でのCompass -v エラー


2017年06月30日

※2017/03/15時点の記事になります。

SassのバージョンがSass 3.5.0-rc.1 (Bleeding Edge)の状態でcompass -vを行うと下記のようなメソッドエラーが発生。

/xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.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)
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:9:in `included'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/sass-3.5.0.pre.rc.1/lib/sass/script/functions.rb:632:in `include'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/sass-3.5.0.pre.rc.1/lib/sass/script/functions.rb:632:in `include'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions.rb:23:in `<module:Functions>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions.rb:19:in `<top (required)>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions.rb:9:in `<top (required)>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core.rb:68:in `<top (required)>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-1.0.3/lib/compass.rb:14:in `block in <top (required)>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-1.0.3/lib/compass.rb:13:in `each'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-1.0.3/lib/compass.rb:13:in `<top (required)>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-1.0.3/bin/compass:20:in `block in <top (required)>'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-1.0.3/bin/compass:8:in `fallback_load_path'
from /xxx/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/compass-1.0.3/bin/compass:19:in `<top (required)>'
from /xxx/.rbenv/versions/2.1.4/bin/compass:23:in `load'
from /xxx/.rbenv/versions/2.1.4/bin/compass:23:in `<main>'

sudo gem uninstall sassでsass 3.5をアンインストールし、sudo gem install sass -v 3.4.23で3.4を再インストールするとエラー解消した。

今はSass使ってないけど、昔の案件とかはSassを使っててコンパイルできなくて焦った。
compass -vでエラーが出る場合はまずSassのバージョンを確かめてみて下さい。

Write a commets