Compass watch: undefined method `exists?' for File:Class
Asked Answered
M

1

6

(very not familiar with ruby/gem/sass/compass)

I have installed on my Ubuntu server 22.04, ruby 3.2.1, gem 3.4.10, sass 3.7.4 and compass 1.0.3 for a very small project. I followed a tuto to get everyting installed.

But when I run compass watch, I get this issue:

NoMethodError on line ["89"] of $HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/compass-1.0.3/lib/compass/configuration/helpers.rb: undefined method `exists?' for File:Class Run with --trace to see the full backtrace

I checked my dear friend Google, but since I'm not familiar with that, I don't know where to look at... That's why I'm here ^^

Any idea to help me to fix this?

Before being on Ubuntu 22.04, I was on 18.04 and it was working like a charm.

Thanks in advance.

Mariel answered 3/4, 2023 at 20:32 Comment(0)
O
12

Whatever tutorial you are following that is telling you to use compass is so incredibly out of date that I do not recommend you continue following it.

If you absolutely must continue using compass then downgrade your version of Ruby from 3.2 to 3.1 or earlier.

Outrigger answered 3/4, 2023 at 21:27 Comment(3)
You could also try to alias the removed exists? to its corresponding exist? method.Florri
After deeper search after posted this message, this is what I found... There is no requirement to use compass, there should be an alternative to achieve the same goal (sass/scss => css) Thanks for your help :)Mariel
I know it's tangential but since it was mentioned, what would replace Compass? I rely on Compass by way of using gulp-compass plugin and I suppose downgrading Ruby to 3.1 is the simplest route. It has just worked for years so we wouldn't have known or thought to be removing/replacing it.Mariner

© 2022 - 2024 — McMap. All rights reserved.