![]() ![]() A version manager helps if youre juggling multiple projects and cant update all at once. Homebrew formulae often need you to alter your environment slightly to configure the new software you're installing. For developing projects with Ruby, you should Install Ruby with Homebrew or use a version manager such as asdf, chruby, rbenv, or rvm. TLDR: pay attention to the output of brew when installing new software. For my new Macbook Pro 14 Inch (Dec 2021), the preinstalled Ruby is at version 2.6.8p205. Unfortunately, the preinstalled version of Ruby on Macs is outdated. These lines are particularly important in the case of rbenv, as they intercept your ruby and gem commands etc., and make sure that your custom installation of Ruby gets used, instead of the built-in/system version. With popular tools written in Ruby such as cocoapods or fastlane, installing Ruby is one of the first task most iOS developers do when setting up a new development environment. Ruby 2D on macOS echo export PATH/usr/local/opt/ruby/bin:PATH > /.bashprofile rbenv install 2.6.2 rbenv global 2.6.2 rbenv versions system 2.6.2. (Note that homebrew itself also needs you to add certain lines in the same way these are in the install docs.) It also would not have repeated to you the necessary lines that rbenv needs you to add to your startup file. So homebrew did nothing beyond telling you it was installed. If you just repeat the original command, homebrew just checks if the formula is already installed. ![]() Homebrew has a dedicated reinstall command that you need to use to reinstall formula. Contribute to Homebrew/install development by creating an account on GitHub. I suspect when you "reinstalled" you just ran the command again, yes? You seem to have things sorted, but just for some (hopefully) helpful perspective. For a guide that compares version managers and shows the best way to install Ruby, see my article Install Ruby on a Mac. A version manager helps if you're juggling multiple projects and can't update all at once. I found an article with someone looking specifically not for solutions using rvm and I wonder if there is a good reason not to use it?) For developing projects with Ruby, you should Install Ruby with Homebrew or use a version manager such as asdf, chruby, rbenv, or rvm. (If I were to, would this command work? curl -sSL | bash -s stable & rvm install ruby-2.6.5. I have found something called rvm but not sure if I should install that. Once everything is installed, we need to instruct rbenv to setup our shell, so we’re using the Ruby runtime version that we’ve customly installed with rbenv whenever we open a new terminal window to type commands in the prompt (as opposed to the preinstalled Ruby 2.6.8 version on the macOS). I have done brew install ruby-build rbenv & rbenv install 2.6.5 & rbenv global 2.6.5. Rbenv will let you jump across Ruby versions easily and install and test out new Ruby. How would I go about changing my ruby version so that my computer actually registers a change? On a Mac, I adequately install everything with Homebrew. I think that homebrew installed in in /usr/local/Cellar/ruby/, but I'm not entirely sure. I ran find / -name ruby but there are so many directories, I don't know where to begin to look. I have brew installed and reinstalled ruby many times, and it assures me: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |