Skip to content

Instantly share code, notes, and snippets.

@wesruv
Last active February 17, 2020 20:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wesruv/cfc54c88a73314d6c3100c058d3a1146 to your computer and use it in GitHub Desktop.
Save wesruv/cfc54c88a73314d6c3100c058d3a1146 to your computer and use it in GitHub Desktop.
Lando config for a Drupal 7 site with Compass Sass
name: mydrupalprojectwithcompass
recipe: drupal7
config:
webroot: docroot
php: '5.6'
database: mysql:5.7
xdebug: true
events:
post-db-import:
- appserver: cd $LANDO_WEBROOT/sites/default && drush rr
services:
appserver:
build:
- "drush @none dl registry_rebuild-7.x -y"
ruby:
type: ruby:2.4
install_dependencies_as_me:
- gem install compass
tooling:
# Sometimes dependencies won't get installed, if that's the case, run:
# lando gem install compass
gem:
service: ruby
ruby:
service: ruby
compass:
service: ruby
@wesruv
Copy link
Author

wesruv commented Dec 24, 2018

It also has drush rr installed and automatically runs it after db-import.

To use compass with this you'd navigate to the folder that needs compass support and run lando compass compile or lando compass watch, or whatever commands/flags you need from compass.

@adamtyoung
Copy link

wow, this is great! not working for me though: I am getting this error when navigating to my theme folder and running lando compass watch: "OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: "compass": executable file not found in $PATH": unknown"

@jimafisk
Copy link

This worked for me, thanks @wesruv!

@adamtyoung sounds like compass didn't install correctly in your container. If you attach to the container with lando ssh -s ruby then try to run compass does it say command bash: compass: command not found?

You could lando destory (make sure you have any backups you need) and lando start again, then check the build for errors.

@wesruv
Copy link
Author

wesruv commented Feb 17, 2020

Sorry I wasn't seeing these notifications!

I've had issues where my ruby deps didn't install and I'd have to manually install it after they were brought up... hoping this is something that can be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment