Bump Ruby in builder images to 3.1
Related to &10034 (closed). Bump the Ruby used in builder images to build packages to 3.1, to match the Ruby we ship to users and use in all other projects. Probably needs gitlab#424131 (closed) to be done first.
Edited by Balasankar 'Balu' C