Rob Lacey

Brighton, UK -

Software Engineer working since 2008 with Ruby / Ruby on Rails, love a bit of Elixir / Phoenix. I also poke through other people's code and make PRs for OpenSource Ruby projects that sometimes make it. Currently working at Juniper Education making code for UK schools.

Clutter and getting rid of XCode

I hate clutter. On Kevin ‘s recommendation I bought Disk Daisy to try and clear guff from my Disk, in the same breath as saying XCode isn’t really needed. Yep I just went with it when I got 5Gb updates just so I could install anything. So first call of business….delete XCode. Just nuked that sucker from my Applications folder. Everything still seems to work. Cool.

However, I might have broken something.

Robs-MacBook-Pro:repos rl$ rbenv install 3.1.0-dev
Downloading openssl-1.1.1l.tar.gz...
Installing openssl-1.1.1l...

BUILD FAILED (macOS 11.6 using ruby-build 20210928)

Inspect or clean up the working tree at /var/folders/xr/tb40m1q965n0x4z21sjd9mhh0000gn/T/ruby-build.20211110082145.18668.XUsYq9
Results logged to /var/folders/xr/tb40m1q965n0x4z21sjd9mhh0000gn/T/ruby-build.20211110082145.18668.log

Last 10 log lines:
***                                                                ***
***       perl --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
xcrun: error: active developer path ("/Applications/") does not exist
Use `sudo xcode-select --switch path/to/` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.

Ok, so we still need command line tools. I knew that but I kinda assume they were installed alongside XCode not as part of it. It does appear that you can install them manually on their own.

Same issue. Do I need to force the Terms and Conditions confirmation again.

Robs-MacBook-Pro:repos rl$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Not can’t even do that.

Robs-MacBook-Pro:repos rl$ xcode-select -h
Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example, 
xcodebuild) as well as the BSD development commands (such as cc and make).

  -h, --help                  print this help message and exit
  -p, --print-path            print the path of the active developer directory
  -s <path>, --switch <path>  set the path for the active developer directory
  --install                   open a dialog for installation of the command line developer tools
  -v, --version               print the xcode-select version
  -r, --reset                 reset to the default command line tools path

Only option I really have is to reset the Command Line Tools path.

sudo xcode-select --reset

And boom….!

rbenv install 3.1.0-dev
Downloading openssl-1.1.1l.tar.gz...
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/rl/.rbenv/versions/3.1.0-dev

Installing ruby-master...
ruby-build: using readline from homebrew
Installed ruby-master to /Users/rl/.rbenv/versions/3.1.0-dev

Ok, easier than I thought.