Guys I\'m about to kill myself with this one!
I had some problems with RVM installing multiple versions of Ruby, and following a thread on Stackoverflow I decided to rem
Try
rvm reinstall ruby-2.3.1 --with-openssl-dir=`brew --prefix openssl`
rvm openssl on Mojave
I aswell ran into the permission problem. My /usr/local/opt where the packages are linked had permissions root:wheel. I changed permissions by doing
sudo chown -R <localuser>:staff /usr/local/opt
where of course "localuser" is your local user you used to install brew.
Then aswell I had to run
brew reinstall autoconf
and so on instead of just "install", since brew always kept on saying the lib already was installed (yet not linked). "reinstall" simply forces a new install of the package. that did the trick for me.
Hope this helps someone with similar problems.
After installing RVM, You'll want to run
rvm requirements
to see if anything else is required to install ruby and rails first.
here is the similar question asked rvm install ruby
I had the same problem
brew install pkg-config
worked for me
I ran into the same issue, you need to manually install all the required packages using Brew. For me I had to run the following installs:
brew install autoconf
brew install automake
brew install libtool
brew install apple-gcc42
brew install libyaml
brew install libxslt
brew install libksba
brew install openssl
You just need to keep running "rvm requirements" and reading the log and installing the packages needed until there are no more errors.
I'd try to install Xcode Command Line Tools before.