Ruby with rustc how to install Rustup and have new rustc?


rustc --version
rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball)
I have rustc installed for Ruby on Ubuntu 22.04.4 LTS desktop Pro and would like to have rustup installed and not current rustc for Rust but still be able to use Ruby which needs a rust compiler, what should I do? If it helps I can completely reinstall Ruby and Ruby is installed via rbenv with Gosu and Ruby2d gems maybe or maybe not, maybe. Problem is, I need to rustc some files and expect old to stay if I say yes and is uninstall safe so what to do?

  • uninstall ruby
  • install rust via rustup
  • Install ruby again

Seems likely to sort it (source), though I've not tried. Worst case scenario, you uninstall rust via rustup and reinstall ruby and you're back to where you started :slight_smile:

Do I not have to get rid of that older rustc? Like uninstall Ruby, uninstall rustc, install Rustup etc., install Ruby again? Also, I know that there is .bashrc stuff I added and can remove, basic process for uninstall is delete ~/.rbenv or maybe move it then remove .bashrc stuff, then remove rustc, then install stuff again, unsure but would it be safe to just move ~/.rbenv like have a backup of it?

Actually probably before delete or move rbenv I should remove or comment out .bashrc stuff, right?

I don't think you need to delete rbenv, only the ruby version it installed.

1 Like

I got it to work with Ruby and Rust stuff and kept all gems by doing comment out Ruby .bashrc stuff, move ~/.rbenv to desktop, uninstall rustc as on that website, do Rust install as on Rust official website, move .rbenv back to original position, uncomment Ruby .bashrc stuff, and then run a rbenv installer maybe or maybe not, maybe. I tested, I have all gems I had, same Ruby version, and new Rust stuff including rustc and Ruby even runs faster now maybe or maybe not, maybe.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.