Jekyll + Tailwind build fails on PostCSS - references different ruby

Trying to convert my portfolio to jekyll and tailwind. Build and serve work perfectly locally.

When I deploy I get a build error, this is the initial error:
3:16:19 PM: /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:70:in `rescue in start_dev_server': Could not connect to the PostCSS server (RuntimeError)

full error is included below.

I’ve read all the other jekyll+tailwind situations and the main painpoint here is that I don’t see any with a similar postCSS issue. They all seem to be failing at bundler or just generally a different path. Mine fails at PostCSS as noted below.

3:14:32 PM: Build ready to start
3:14:41 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
3:14:41 PM: build-image tag: v4.10.1
3:14:41 PM: buildbot version: f45292fab0b32cea549baa8489f553abb9d888be
3:14:41 PM: Fetching cached dependencies
3:14:41 PM: Failed to fetch cache, continuing with build
3:14:41 PM: Starting to prepare the repo for build
3:14:41 PM: No cached dependencies found. Cloning fresh repo
3:14:41 PM: git clone https://github.com/keaton-taylor/keaton-taylor.github.io
3:14:42 PM: Preparing Git Reference refs/heads/main
3:14:42 PM: Parsing package.json dependencies
3:14:43 PM: Starting build script
3:14:43 PM: Installing dependencies
3:14:43 PM: Python version set to 2.7
3:14:44 PM: Downloading and installing node v12.18.0...
3:14:44 PM: Downloading https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz...
3:14:44 PM: Computing checksum with sha256sum
3:14:44 PM: Checksums matched!
3:14:46 PM: Now using node v12.18.0 (npm v6.14.4)
3:14:46 PM: Started restoring cached build plugins
3:14:46 PM: Finished restoring cached build plugins
3:14:46 PM: Required ruby-3.1.2 is not installed.
3:14:46 PM: To install do: 'rvm install "ruby-3.1.2"'
3:14:46 PM: Attempting ruby version 3.1.2, read from .ruby-version file
3:14:46 PM: Required ruby-3.1.2 is not installed - installing.
3:14:46 PM: Searching for binary rubies, this might take some time.
3:14:48 PM: Found remote file https://rubies.travis-ci.org/ubuntu/20.04/x86_64/ruby-3.1.2.tar.bz2
3:14:48 PM: Checking requirements for ubuntu.
3:14:48 PM: Requirements installation successful.
3:14:48 PM: ruby-3.1.2 - #configure
3:14:48 PM: ruby-3.1.2 - #download
3:14:50 PM: No checksum for downloaded archive, recording checksum in user configuration.
3:14:50 PM: ruby-3.1.2 - #validate archive
3:14:54 PM: ruby-3.1.2 - #extract
3:14:57 PM: ruby-3.1.2 - #validate binary
3:14:57 PM: ruby-3.1.2 - #setup
3:14:57 PM: ruby-3.1.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-3.1.2@global
3:14:57 PM: ruby-3.1.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
3:14:58 PM: ruby-3.1.2 - #generating global wrappers........
3:14:58 PM: ruby-3.1.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-3.1.2
3:14:58 PM: ruby-3.1.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
3:14:58 PM: ruby-3.1.2 - #generating default wrappers........
3:14:59 PM: Using /opt/buildhome/.rvm/gems/ruby-3.1.2
3:14:59 PM: Using ruby version 3.1.2
3:14:59 PM: Using bundler version 2.3.20 from Gemfile.lock
3:14:59 PM: Successfully installed bundler-2.3.20
3:14:59 PM: 1 gem installed
3:14:59 PM: Using PHP version 8.0
3:14:59 PM: Started restoring cached ruby gems
3:14:59 PM: Finished restoring cached ruby gems
3:14:59 PM: Installing gem bundle
3:14:59 PM: [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local path '/opt/build/cache/bundle'`, and stop using this flag
3:15:00 PM: [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all`
3:15:01 PM: Fetching gem metadata from https://rubygems.org/...........
3:15:01 PM: Resolving dependencies...
3:15:01 PM: Using bundler 2.3.20
3:15:01 PM: Fetching concurrent-ruby 1.1.10
3:15:01 PM: Fetching forwardable-extended 2.6.0
3:15:01 PM: Fetching rb-fsevent 0.11.1
3:15:01 PM: Fetching rexml 3.2.5
3:15:01 PM: Fetching liquid 4.0.3
3:15:01 PM: Fetching mercenary 0.4.0
3:15:01 PM: Fetching rouge 3.30.0
3:15:01 PM: Fetching safe_yaml 1.0.5
3:15:01 PM: Fetching webrick 1.7.0
3:15:01 PM: Fetching colorator 1.1.0
3:15:01 PM: Fetching eventmachine 1.2.7
3:15:01 PM: Fetching http_parser.rb 0.8.0
3:15:01 PM: Fetching ffi 1.15.5
3:15:01 PM: Fetching jekyll-postcss 0.5.0
3:15:01 PM: Fetching public_suffix 4.0.7
3:15:01 PM: Fetching unicode-display_width 1.8.0
3:15:01 PM: Installing unicode-display_width 1.8.0
3:15:01 PM: Installing colorator 1.1.0
3:15:01 PM: Installing mercenary 0.4.0
3:15:01 PM: Installing forwardable-extended 2.6.0
3:15:01 PM: Installing jekyll-postcss 0.5.0
3:15:01 PM: Installing safe_yaml 1.0.5
3:15:01 PM: Installing liquid 4.0.3
3:15:01 PM: Fetching pathutil 0.16.2
3:15:01 PM: Installing webrick 1.7.0
3:15:01 PM: Installing rb-fsevent 0.11.1
3:15:01 PM: Fetching terminal-table 2.0.0
3:15:01 PM: Installing rexml 3.2.5
3:15:01 PM: Installing public_suffix 4.0.7
3:15:01 PM: Installing pathutil 0.16.2
3:15:01 PM: Installing terminal-table 2.0.0
3:15:01 PM: Installing http_parser.rb 0.8.0 with native extensions
3:15:01 PM: Installing eventmachine 1.2.7 with native extensions
3:15:01 PM: Installing concurrent-ruby 1.1.10
3:15:01 PM: Fetching addressable 2.8.0
3:15:01 PM: Installing rouge 3.30.0
3:15:01 PM: Fetching kramdown 2.4.0
3:15:01 PM: Installing ffi 1.15.5 with native extensions
3:15:01 PM: Installing addressable 2.8.0
3:15:01 PM: Installing kramdown 2.4.0
3:15:01 PM: Fetching i18n 1.12.0
3:15:02 PM: Installing i18n 1.12.0
3:15:02 PM: Fetching kramdown-parser-gfm 1.1.0
3:15:02 PM: Installing kramdown-parser-gfm 1.1.0
3:15:09 PM: Fetching sassc 2.4.0
3:15:09 PM: Fetching rb-inotify 0.10.1
3:15:09 PM: Installing rb-inotify 0.10.1
3:15:09 PM: Fetching listen 3.7.1
3:15:09 PM: Installing sassc 2.4.0 with native extensions
3:15:09 PM: Installing listen 3.7.1
3:15:09 PM: Fetching jekyll-watch 2.2.1
3:15:09 PM: Installing jekyll-watch 2.2.1
3:15:13 PM: Fetching em-websocket 0.5.3
3:15:13 PM: Installing em-websocket 0.5.3
3:16:00 PM: Fetching jekyll-sass-converter 2.2.0
3:16:00 PM: Installing jekyll-sass-converter 2.2.0
3:16:00 PM: Fetching jekyll 4.2.2
3:16:00 PM: Installing jekyll 4.2.2
3:16:00 PM: Bundle complete! 3 Gemfile dependencies, 30 gems now installed.
3:16:00 PM: Bundled gems are installed into `/opt/build/cache/bundle`
3:16:00 PM: Gem bundle installed
3:16:00 PM: No npm workspaces detected
3:16:00 PM: Started restoring cached node modules
3:16:00 PM: Finished restoring cached node modules
3:16:00 PM: Installing NPM modules using NPM version 6.14.4
3:16:03 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN repo No repository field.
3:16:03 PM: npm WARN repo No license field.
3:16:03 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
3:16:03 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:16:03 PM: added 213 packages from 148 contributors and audited 214 packages in 1.987s
3:16:03 PM: 38 packages are looking for funding
3:16:03 PM:   run `npm fund` for details
3:16:03 PM: found 0 vulnerabilities
3:16:03 PM: NPM modules installed
3:16:03 PM: Started restoring cached go cache
3:16:03 PM: Finished restoring cached go cache
3:16:03 PM: Installing Go version 1.14.4 (requested 1.14.4)
3:16:07 PM: unset GOOS;
3:16:07 PM: unset GOARCH;
3:16:07 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64';
3:16:07 PM: export PATH="/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64/bin:${PATH}";
3:16:07 PM: go version >&2;
3:16:07 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.14.4.linux.amd64.env"
3:16:07 PM: go version go1.14.4 linux/amd64
3:16:07 PM: Installing missing commands
3:16:07 PM: Verify run directory
3:16:08 PM: ​
3:16:08 PM: ────────────────────────────────────────────────────────────────
3:16:08 PM:   Netlify Build                                                 
3:16:08 PM: ────────────────────────────────────────────────────────────────
3:16:08 PM: ​
3:16:08 PM: ❯ Version
3:16:08 PM:   @netlify/build 27.15.7
3:16:08 PM: ​
3:16:08 PM: ❯ Flags
3:16:08 PM:   baseRelDir: true
3:16:08 PM:   buildId: 630929a8cdc74a0008844eda
3:16:08 PM:   deployId: 630929a8cdc74a0008844edc
3:16:08 PM: ​
3:16:08 PM: ❯ Current directory
3:16:08 PM:   /opt/build/repo
3:16:08 PM: ​
3:16:08 PM: ❯ Config file
3:16:08 PM:   No config file was defined: using default values.
3:16:08 PM: ​
3:16:08 PM: ❯ Context
3:16:08 PM:   production
3:16:08 PM: ​
3:16:08 PM: ────────────────────────────────────────────────────────────────
3:16:08 PM:   1. Build command from Netlify app                             
3:16:08 PM: ────────────────────────────────────────────────────────────────
3:16:08 PM: ​
3:16:08 PM: $ jekyll build --trace
3:16:09 PM: Configuration file: /opt/build/repo/_config.yml
3:16:19 PM: /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:70:in `rescue in start_dev_server': Could not connect to the PostCSS server (RuntimeError)
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:61:in `start_dev_server'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:13:in `initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `new'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `block in initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `fetch'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `new'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `block (2 levels) in instantiate_subclasses'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `map!'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `block in instantiate_subclasses'
	from <internal:kernel>:90:in `tap'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:319:in `instantiate_subclasses'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:133:in `setup'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:36:in `initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:in `new'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:in `process'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
	from /opt/build/cache/binstubs/jekyll:27:in `load'
	from /opt/build/cache/binstubs/jekyll:27:in `<main>'
/opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:62:in `initialize': Cannot assign requested address - connect(2) for "localhost" port 8124 (Errno::EADDRNOTAVAIL)
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:62:in `open'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:62:in `start_dev_server'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll-postcss/socket.rb:13:in `initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `new'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `block in initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `fetch'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-postcss-0.5.0/lib/jekyll/converters/postcss.rb:16:in `initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `new'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `block (2 levels) in instantiate_subclasses'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `map!'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:321:in `block in instantiate_subclasses'
	from <internal:kernel>:90:in `tap'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:319:in `instantiate_subclasses'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:133:in `setup'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:36:in `initialize'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:in `new'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:30:in `process'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /opt/build/cache/bundle/ruby/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
	from /opt/build/cache/binstubs/jekyll:27:in `load'
	from /opt/build/cache/binstubs/jekyll:27:in `<main>'
​
3:16:19 PM: ────────────────────────────────────────────────────────────────
3:16:19 PM:   "build.command" failed                                        
3:16:19 PM: ────────────────────────────────────────────────────────────────
3:16:19 PM: ​
3:16:19 PM:   Error message
3:16:19 PM:   Command failed with exit code 1: jekyll build --trace (https://ntl.fyi/exit-code-1)
3:16:19 PM: ​
3:16:19 PM:   Error location
3:16:19 PM:   In Build command from Netlify app:
3:16:19 PM:   jekyll build --trace
3:16:19 PM: ​
3:16:19 PM:   Resolved config
3:16:19 PM:   build:
3:16:19 PM:     command: jekyll build --trace
3:16:19 PM:     commandOrigin: ui
3:16:19 PM:     publish: /opt/build/repo/_site
3:16:19 PM:     publishOrigin: ui
3:16:19 PM: Caching artifacts
3:16:19 PM: Started saving ruby gems
3:16:19 PM: Finished saving ruby gems
3:16:19 PM: Started saving node modules
3:16:19 PM: Finished saving node modules
3:16:19 PM: Started saving build plugins
3:16:19 PM: Finished saving build plugins
3:16:19 PM: Started saving pip cache
3:16:19 PM: Finished saving pip cache
3:16:19 PM: Started saving emacs cask dependencies
3:16:19 PM: Finished saving emacs cask dependencies
3:16:19 PM: Started saving maven dependencies
3:16:19 PM: Finished saving maven dependencies
3:16:19 PM: Started saving boot dependencies
3:16:19 PM: Finished saving boot dependencies
3:16:19 PM: Started saving rust rustup cache
3:16:19 PM: Finished saving rust rustup cache
3:16:19 PM: Started saving go dependencies
3:16:19 PM: Finished saving go dependencies
3:16:21 PM: Cached ruby version 3.1.2
3:16:21 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:16:21 PM: Creating deploy upload records
3:16:21 PM: Failing build: Failed to build site
3:16:21 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
3:16:21 PM: Finished processing build request in 1m40.134312585s

This one seems to have worked for all: