![]() ![]() Your system Ruby needs to stay as it is as you probably want to avoid finding out that it was sacrosanct the hard way. I'd recommend removing the Homebrew installed instance of Ruby, install either RVM or rbenv, and then allow that "sandbox manager" to handle your Rubies. rbenv global to see which version is set to be your global version. rbenv versions, to verify that the newly installed version is on the list. I've used them both and they work extremely well. If you have rbenv, run these commands in Terminal: rbenv install 3.0.1(or any other desired version number) to install the version you want. RVM and rbenv are two such tools commonly used in the Ruby world to handle this. So, some enterprising, really-smart, people figured out we could manipulate our PATH setting, store our Rubies in a different location, typically our home directory, and then write code that can manage which version we want to use. But, inevitably we'd mess up, type the wrong "ruby" and break something. To fix that we'd end up tacking on version numbers, like ruby193 or ruby2.2 to multiple instances in /usr/local/bin and then write scripts with #! lines pointing to the appropriate version. The downside to this is that we're only able to have two versions of ruby. Tools that need the originals still know to look in /usr/bin. That allows us to add overrides to commands if we want, again by putting them in the /usr/local/bin directory. Typically it'll have "/usr/local/bin:/usr/bin" so that the OS will search in the "local" repository of executables before it'll look in the "system" repository. Our PATH environment variable defines the search path to find things. ![]() However, I have no idea which caused 'Failed to install Homebrew Portable Ruby (and your system version is too old)'. Try switching over to rbenv to install and manage your ruby: brew update brew install rbenv ruby-build Afterwards youll still need to add eval '(rbenv init -)' to your profile. "local" implies it's for the "local" user's use, not for the system's use. After running 'brew config', 'portable-ruby-2.6.8.' had downloaded with VPN, sha256 verification also passed. ![]() If the user decides to install another version, perhaps because it's more recent, and it's for their use, not for the system's, it'll go into /usr/local/bin/ruby. We can use that, but we shouldn't alter/update/delete it because those tools would break, possibly with spectacular results. That version will be used by system-installed Ruby-centric scripts. By default the ruby executable will be found in /usr/bin/ruby. It's possible to have multiple instances of a language installed on a system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |