'how to remove all remains of a global (sudo) ruby and rails installation for a clean reinstallation?
I have installed ruby, then rails. Although the installation of rails ended with a success message, every rails command such als rails -v gave me the output
"Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command."
I did as the message told me (yes, i know already this was the most stupid thing possible).
Still rails commands give the same output as before.
So I deinstalled it and installed first the version manager asdf, then Ruby with the command asdf install ruby 2.7.2. This first worked, but after I installed rails with gem install rails --version=7.0.1, there is still the same problem. With which rails, I get the output /usr/bin/rails, but which ruby throws /Users/<name>/.asdf/shims/ruby
It looks like Rails is installed in the wrong path. The Rails path is the same as in the old installation. Some debris from that installation seems do direct new installations there, where they do not belong.
How can I remove everything which might been left from the old and the current installation, to start with a clean system?
Alls answers I found require RVM or a file like .bashsrc, but I have asdf and a .zshrc file.
Is /usr/bin/rails needed for the default ruby, or can I delete it?
My system is Mac OS Monterey 12.3 on a Macbook Pro with Intel processor.
Unfortunately, I do not remember exactly how I installed Ruby the first time. It was with homebrew.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
