6

The error output in console:

/var/lib/gems/2.1.0/gems/compass-core-    1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:5:in `has?'
build-server_1        | [10:22:15] : undefined method `has?' for Sass::Util:Module (NoMethodError)
build-server_1        |         from /var/lib/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:9:in `included'

It seems to be missing a method has but unsure what version of ruby or compass or any flags to add to the current file here to prevent this:

# install ruby RUN apt-get install -y -qq ruby-dev RUN apt-get install make RUN apt-get install rubygems -y

# install compass RUN gem install --no-rdoc --no-ri compass

Tried and replaced last ruby line with:

RUN apt-get install ruby-ffi -y

And

RUN apt-get install ruby-dev -y

and compass without the flags.

Any suggestions please? This works on other machines. I have recently done a fresh Win 10 install on this paticular one and reinstalled ruby on my machine with env path set to C:\Ruby23-x64\bin but wouldn't have thought this would affect installing modules and running in a docker container.

DOCKERFILE

version: '2'
services:
  node:
    build:
      context: .
      dockerfile: docker/dockerfiles/node-dev
    ports:
-     "3000:3000"
    expose:
-     "3000"
    volumes:
-     .:/usr/src/app
- /usr/src/app/node_modules
volumes_from:
- submissions
environment:
- NODE_ENV=development
links:
- mongo
submissions:
 build:
  context: .
  dockerfile: docker/dockerfiles/golang
 volumes:
- /files
 links:
- mongo
build-server:
 build:
  context: .
  dockerfile: docker/dockerfiles/build-server
 environment:
 - NODE_ENV=development
 volumes_from:
- node
links:
 - node
 ports:
 - "8080:8080"
build-server-admin:
build:
  context: .
  dockerfile: docker/dockerfiles/build-server-admin
environment:
- NODE_ENV=development
volumes_from:
- node
mongo:
 image: mongo
sledgeweight
  • 7,685
  • 5
  • 31
  • 45

2 Answers2

23

This have to be connected with release of sass 3.5. You need to install correct version of sass before installing compass.

RUN gem install --no-rdoc --no-ri sass -v 3.4.22
RUN gem install --no-rdoc --no-ri compass
Krzysztof
  • 344
  • 1
  • 6
2

I ran today to a similar issue with compass in a docker container:

[11:12:23] /var/lib/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:5:in `has?'
[11:12:23] : undefined method `has?' for Sass::Util:Module (NoMethodError)
    from /var/lib/gems/2.1.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:9:in `included'
    from /var/lib/gems/2.1.0/gems/sass-3.5.0.pre.rc.1/lib/sass/script/functions.rb:632:in `include'

I've fixed it by adding in my docker file

RUN gem install sass

I'm not sure this is the best thing to do but it fixed the issue.

remborg
  • 528
  • 3
  • 14
  • Didn't work, same error unfortunately. This was after docker-compose build and then docker-compose up. – sledgeweight Sep 03 '16 at 09:58
  • My error append when I was starting the container. I've added the sass install command in the dockerfile I use when I'm creating the container with docker-compose (I'm using bamboo and nexus). Are you using a CI tool to build your container? A custom repo? Maybe you could have some sort of caching issue somewhere (and so some dependencies are not pulled from the last version)? – remborg Sep 05 '16 at 07:32