Home > Blockchain >  How to configure rbenv with ruby?
How to configure rbenv with ruby?

Time:01-27

I've tried to install ruby on my mac. Ruby is already installed :

brew install ruby
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
ghcup                                     reshape                                   tidy-viewer                               vermin
==> Updated Formulae
Updated 159 formulae.
==> New Casks
kindavim                                                 music-bar                                                presentation
==> Updated Casks
Updated 143 casks.
==> Deleted Casks
airqmon

Warning: ruby 3.0.3 is already installed and up-to-date.
To reinstall 3.0.3, run:
  brew reinstall ruby

But when i run ruby -version, i get the following result :

   /Users/oscar/.rbenv/shims/ruby: line 21: /usr/local/Cellar/rbenv/0.4.0/libexec/rbenv: No such file or directory

I am using rbenv. I've tried to reinstall rbenv but i get the same error. I am new in ruby and i need some help please. How to solve this error ? Thanks

CodePudding user response:

You installed Ruby previously with rbenv and now you show that you installed Ruby with brew, which is a totally different process. I assume you removed your rbenv installation, but left around some leftovers. If you wish to continue with your brew Ruby installation, which is in my opinion perfectly good, you just need to remove the rbenv leftovers by removing your /Users/oscar/.rbenv directory, possibly you may also need to restart your Terminal.

  •  Tags:  
  • Related