The error message "cannot set LC_ALL" typically occurs when there is an issue with setting or configuring the locale environment variables on your system.
Try the following to set your locales: (en_US.UTF-8 for english speakers)
sudo locale-gen en_US.UTF-8
sudo update-locale
Once that has updated the locales, you can then try again to set your ruby version