The Problem
After upgrading to Ubuntu 20.04, Ruby on Rails gem installations fail. If you use rvm this fails with rvm-managed environments too. Running
bundle install
bundle update
gem install
all fail.
Error Messages
You will see errors that look like this (in this case it's the byebug gem but other gems will also give the same error):
ERROR: Error installing byebug:
ERROR: Failed to build gem native extension.
make DESTDIR\= install
make: /usr/bin/mkdir: Command not found
The Solution
The problem is that Ubuntu 20.04 changes the location of the mkdir command, moving it from /usr/bin to /bin.
The easiest solution is to symbolically link the mkdir command back into /usr/bin.
- su - to root (or use sudo to execute the command below)
- ln -s /bin/mkdir /usr/bin/