Error when installing Ruby 2.1.3 with RVM
I had the same problem
rvm reinstall 2.1.3 --disable-binary
worked for me
(based on Fresh Installs of RVM and Ruby 2.1.1 - dyld library/pathing error).
RVM install ruby failed to install rubies, RVM installed in /usr/local
Your problem is in permissions:
mkdir: /usr/local/rvm/tmp/rvm_src_7085: Permission denied
You have RVM installed in /usr/local
I am running RVM on OS X Yosemite and have my RVM installed in my home directory:
/Users/andy...
If you want to install globally like you have it, you will probably have to use the sudo
command to complete the install. But I would highly recommend NOT doing that.
You should uninstall RVM and re-install it under your home directory. That is, open the terminal and ensure that you are in your home directory:
cd ~/
will put you in your home directory. Then install RVM and DO NOT use sudo, just install it with your regular permissions. That is the whole point of RVM, to keep the versions of Ruby separate.
Here is the Stack Overflow answer for removing all traces of the old RVM from your system before reinstalling:
How can I remove RVM (Ruby Version Manager) from my system?
Be sure and pay attention to the part at the end about checking for modifications to your $PATH variable.
Ruby 2.1.3 installation in Ubuntu 14.04.1 hang?
Looks like this might do the trick. It worked for me on OS X.
rvm install 2.1.3 -- --with-setjmp-type=setjmp
Found the solution in this rvm issue, which references a core Ruby installation issue.
Installing ruby-2.1.2: Cannot load such file -- openssl (LoadError)
Ruby <2.4 is incompatible with OpenSSL 1.1 (e.g see https://github.com/rbenv/ruby-build/issues/1353).
Just a hunch, but if you're using Mac + Homebrew, OpenSSL 1.0 was recently deleted, so anything along the lines of brew upgrade openssl
would trash that.
There are several options to deal with this:
- I have older Rubies via
asdf
installed with LibreSSL (which may be safer anyway, see https://security.stackexchange.com/questions/112545/what-are-the-main-advantages-of-using-libressl-in-favor-of-openssl):
$ openssl
OpenSSL> version
LibreSSL 2.8.3
- Compile and link your own OpenSSL 1.0 (or then set compiler flags as environment variables when building Ruby -- https://rvm.io/rubies/installing)
- See if your system's package manager allows you to access openssl 1.0 and install with that (was helping a coworker with this recently and we weren't able to find a good keg for homebrew at this time, unfortunately)
There might be something less convoluted than that; if someone has ideas, please feel free to comment or give an alternate answer.
EDIT
I personally ran into this issue with some other software and discovered that this fixed it, since the old SSL version was sitting around still:
brew switch openssl 1.0.2s
Should work so long as Homebrew doesn't "helpfully" clean that out for me.
How do I upgrade RVM when the official way doesn't work?
Install RVM from scratch
1) First remove the current version, see: https://stackoverflow.com/a/3558763/1076207
# use sudo at your own discretion
rvm implode --force
gem uninstall rvm
rm -rf ~/.rvm
# open file
vim ~/.bash_profile
# remove lines:
# [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# close file
2) Follow the directions on the RVM install page: https://rvm.io/rvm/install
Related Topics
Rails 3/ Git/ Bundler Fatal Could Not Parse Object
"No Available Formula for Gcc46" While Installing Ruby 1.9.3 on Os X with Rvm:
Logger.Debug Not Writing to Log File in Rails
Rails Routing: Giving Default Values for Path Helpers
How to Iterate Over an Array of Arrays
I Can't Remove Whitespaces from a String Parsed by Nokogiri
Rails 3:Do I Need to Give Return True in a Before_Save Callback for an Object.Save to Work
Why Are My Thread Variables Intermittent in Rails
Why Is Rack Response Body an Array Not a String
Rails - Link_To Helper with Data-* Attribute
Compute Geo Distance in Elasticsearch
Best Way to Use HTML5 Data Attributes with Rails Content_Tag Helper
How to Store a Ruby Array into a File
Where Do You Put CSS Files in a Rails App Directory
What's the Efficient Way to Multiply Two Arrays and Get Sum of Multiplied Values in Ruby