Search code examples
rubydockercompass

Compass provision failing with Docker compose up


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

Solution

  • 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