I am newbie ruby developer. I cannot figure out one annoying thing.
I have macOS sierra installed on my macbook.
When I type ruby -v
I get following output
$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
I am using RubyMine
IDE as well.
So I've tried to update my ruby globally, I've found different tutorials on the internet, preferred ways are RVM
and RBENV
. I tried to install the them but instead of updating ruby globally I got multiple versions of ruby installed in different locations. Because all these tools use different ways for providing ruby binary for current user, but both of them work only for current user because of global PATH
variable modifications in .bash_*
files.
So now I feel like a have a lot of garbage left from these tools, I used find
to remove all folders and occurrences but in Ruby Mine I get following
I have no idea why rbenv
and rvm
are still here as far as I've removed them from the system. Is there any to get rid of them in Ruby Mine.
But my main question is how can I update ruby GLOBALLY in /usr/bin/
directory without using this annoying tools. I don't need to maintain multiple apps with differen ruby versions, I need global ruby update, so when I type /usr/bin/ruby -v
I get latest version.
Please help to solve this problem, I have spent a lot of time trying to deal with this simple
problem.
Thank you
Do not overwrite anything in /usr/bin. macOS doesn't allow this by default, and for good reason. It can break all kinds of unexpected things.
If you want to install the latest version of Ruby globally, the easiest way to do so would be to use Homebrew. Just follow the installation instructions then
brew install ruby
to install the latest version (currently 2.4.0) to /usr/local/bin.To remove your RVM and rbenv installations, delete .rvm and .rbenv.