Missing symbol when installing ruby-2.3.0 on OS X 10.11.6 by RVM
I had the same problem with Ruby 2.3.1 (El Capitan). The good news I solved it. :-)
I followed the installation tutorial on this page: https://gorails.com/setup/osx/10.10-yosemite
After the first step:
brew install rbenv ruby-build
There is a message like: "Install the XCode Command Line Tools." Maybe they need to be reinstalled after updating XCode.
Like suggested, run:
sudo xcode-select --install
After that the Build and Install of Ruby worked for me.
BUILD FAILED Error When Trying to Install Ruby 2.4.2
Figured it out. Error is resolved by running xcode-select --install
.
See https://github.com/Homebrew/homebrew-core/issues/4809
Gemset error when updating to Ruby 2.4.2
Found a fix as referenced in this RVM GitHub issue that involves installing zlib using brew and then re-installing ruby while pointing to that zlib directory.
As someone in that thread pointed out, this shouldn't be necessary. Still not sure why the problem arose.
Steps
$ brew install zlib
$ rvm remove 2.4.2
$ rvm install 2.4.2 —-with-zlib-dir=/usr/local/Cellar/zlib/1.2.11
How to reinstall brew on El Capitan?
I found out the problem.
I ran type -a ruby
and saw I had installed two ruby: one on /usr/bin and another on /usr/local/bin
I just mv /usr/local/bin/ruby /usr/local/bin/rubybkp
and solve the problem
After this I ran ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
to reinstall brew.
Ruby: BUILD FAILED (macOS 11.2 using ruby-build 20210119) Mac Big Sur
This is not an official solution. I'm sure the rbenv devs are working on an actual solution but this workaround should help others who are setting up their ruby environments on the new M1 chips for Mac.
Make sure your Terminal is using Rosetta. You can find how to do that using Google.
Uninstall your current
rbenv
following these instructions Removing rbenv. Be sure you also remove all the downloaded versions of ruby if you have any (minus the system default) located in/Users/<your user name>/.rbenv/versions/
.Uninstall the ARM version of Homebrew with:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Install the x86_64 version of Homebrew with:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
If you run
brew install rbenv
should produce output saying "Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!". This is expected.You want to tell brew to install the older architecture x86_64
arch -x86_64 brew install rbenv
Then finally install the version you want using
arch -x86_64 rbenv install x.x.x
(x = some number i.e. 2.7.2)
From there you just need to remember to tell brew arch -x86_64
when installing other versions of Ruby.
Once an actual fix comes through you'll be able to switch back to the newer architecture and not have to use the arch
argument. You also don't have to do this all the time with brew either, just rbenv.
Related Topics
How to Send Email via Smtp with Ruby's Mail Gem
Geocoder, How to Test Locally When Ip Is 127.0.0.1
Using a String as a Variable at Run Time
Why Did Matz Choose to Make Strings Mutable by Default in Ruby
How to Uninstall Ruby on Rails on MAC Os X
Change the Binding of a Proc in Ruby
How to Download via Http Only Piece of Big File with Ruby
Heroku and Rails: Gem Load Error with Postgres, However It Is Specified in Gemfile
Update Just One Gem with Bundler
How to Suppress Rails Console/Irb Outputs
Error While Installing Nokogiri (1.6.7) on El Capitan
What Are the Paths That "Require" Looks Up by Default
Magic First and Last Indicator in a Loop in Ruby/Rails
Ruby on Rails: How to Edit Database.Yml for Postgresql