10/5/2023 0 Comments Homebrew install ruby versionSet up a separate Ruby dev environment with Rosetta.Revert to version 13.4 of the command line tools (this only works on Monterey).Read my guide that shows how and why to upgrade the Ruby version in your project. ![]() If you’re having issues running older versions of Ruby (2.6 and below), you have the following options: It automatically determines whether or not any flag is needed, and optimizes the installation for you. If you use Ruby on Mac, you don’t have to worry about any of this, now or in the future. Now that 3.1.3 and 2.7.7 are released, you should no longer need to add the -enable-shared flag. Today, you can install rice without the -enable-shared flag (I tested with Ruby 3.1.3 on both my Intel and M1 Mac), so there doesn’t seem to be a good reason to turn it on by default anymore. However, turning on that flag affects performance. If you use a different tool, such as asdf or rbenv, you might be able to install these older versions (such as 2.7.6 or 3.1.2) out of the box because they both use ruby-build, which adds the -enable-shared flag by default.Īs an aside, that flag was turned on by default in ruby-build back in 2019 because some gems, like rice, failed to install otherwise. After that, you can update to the latest version by simply running romup in your Terminal if you have the Prime version, or rom update in the Ultimate version.įor non-customers who use ruby-install or frum, if you want to install versions of Ruby 3.1.x older than 3.1.3, or Ruby 2.7.x older than 2.7.7, you can install them by adding the -enable-shared flag, like this: If you’re a Ruby on Mac customer, check your email for a link to download the latest version. I’ve written a detailed guide that explains how and why to upgrade the Ruby version in your project. However, instead of using workarounds for older versions, I highly recommend you update your project to a newer version of Ruby. For older Ruby versions, you’ll still need the workarounds. ![]() UPDATE on 11/26/22: Ruby 3.1.3, 3.0.5, and 2.7.7 are now available, so you should be able to install them without any of the workarounds mentioned in this article. I confirmed this on my M1 MacBook Air by cloning the Ruby GitHub repo, checking out the ruby_3_1 branch, and compiling Ruby 3.1.3. This means that when 3.1.3 and 2.7.7 are released, you’ll be able to install them without any workarounds. UPDATE: PR 6440 in the Ruby GitHub repo fixes this issue in 3.1 and 2.7. If the version starts with 14, then keep reading. If you’ve recently updated your Intel or Apple Silicon Mac to macOS 12.6.x (Monterey) or 13.x (Ventura), or if you updated the Apple command line tools and/or Xcode to version 14 on macOS 12.5 or higher, and are unable to install Ruby or certain gems (most likely due to an error that says “ld: symbol(s) not found for architecture arm64” or “ld: symbol(s) not found for architecture x86_64”), this guide is for you.Īssuming you already have Homebrew installed, you can find out which version of the command line tools and/or Xcode you’re using by running brew config, then look for the lines that start with CLT: and Xcode.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |