Description
Description
When installing MRI 2.6.1 on macOS 10.14.4 Beta, all goes well until #installing rubygems-3.0.2. At that point I see this:
Error running 'env GEM_HOME=/ruby-2.6.1@global GEM_PATH= /Users/jdashton/.rvm/rubies/ruby-2.6.1/bin/ruby -d /Users/jdashton/.rvm/src/rubygems-3.0.2/setup.rb --no-document',
please read /Users/jdashton/.rvm/log/1549554328_ruby-2.6.1/rubygems.install.log
Steps to reproduce
-
Install rvm master with rvm get master.
-
Install Ruby 2.6.1 with rvm install 2.6.
Expected behavior
Ruby 2.6.1 should be cleanly installed.
Actual behavior
Installation fails with an error about running setup.rb for rubygems-3.0.2.
Environment info
ruby-2.5.3:
system:
uname: "Darwin d11442.nadadventist.org 18.5.0 Darwin Kernel Version 18.5.0: Thu Jan 31 01:17:54 PST 2019; root:xnu-4903.250.319~62/RELEASE_X86_64 x86_64"
name: "OSX"
version: "10.14"
architecture: "x86_64"
bash: "/usr/local/bin/bash => GNU bash, version 5.0.2(1)-release (x86_64-apple-darwin18.2.0)"
zsh: "/usr/local/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin18.2.0)"
remote_path: "osx/10.14/x86_64"
xcode: "10.1"
rvm:
version: "1.29.7-next (master)"
updated: "58 minutes 18 seconds ago"
path: "/Users/jdashton/.rvm"
autolibs: "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."
ruby:
interpreter: "ruby"
version: "2.5.3p105"
date: "2018-10-18"
platform: "x86_64-darwin18"
patchlevel: "2018-10-18 revision 65156"
full_version: "ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]"
homes:
gem: "/Users/jdashton/.rvm/gems/ruby-2.5.3"
ruby: "/Users/jdashton/.rvm/rubies/ruby-2.5.3"
binaries:
ruby: "/Users/jdashton/.rvm/rubies/ruby-2.5.3/bin/ruby"
irb: "/Users/jdashton/.rvm/rubies/ruby-2.5.3/bin/irb"
gem: "/Users/jdashton/.rvm/rubies/ruby-2.5.3/bin/gem"
rake: "/Users/jdashton/.rvm/gems/ruby-2.5.3@global/bin/rake"
environment:
PATH: "/Users/jdashton/.rvm/gems/ruby-2.5.3/bin:/Users/jdashton/.rvm/gems/ruby-2.5.3@global/bin:/Users/jdashton/.rvm/rubies/ruby-2.5.3/bin:/Users/jdashton/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/Users/jdashton/.rvm/bin:/Users/jdashton/bin"
GEM_HOME: "/Users/jdashton/.rvm/gems/ruby-2.5.3"
GEM_PATH: "/Users/jdashton/.rvm/gems/ruby-2.5.3:/Users/jdashton/.rvm/gems/ruby-2.5.3@global"
MY_RUBY_HOME: "/Users/jdashton/.rvm/rubies/ruby-2.5.3"
IRBRC: "/Users/jdashton/.rvm/rubies/ruby-2.5.3/.irbrc"
RUBYOPT: ""
gemset: ""
Activity
Voxoff commentedon Feb 11, 2019
yup I have this on 10.14.1
mshea24 commentedon May 2, 2019
10.14.2 as well
galtzo commentedon Jul 10, 2019
This is still an issue on 10.14.5 installing ruby-2.5.3.
@mshea24
10.14.12, perhaps you meant 10.14.2.Here is my install log:
Pulling the important bits out of the log, we can see
GEM_HOME
andGEM_PATH
are set:But the command seems to override them to very bad values:
Breaking it down further, these settings are not valid:
This is fundamentally the same issue as #4608
renatolond commentedon Dec 4, 2019
Hi! I'm also having the issue and I'm on Arch Linux.
From what I can gather, seems like a similar issue to #4287 / rubygems/rubygems#2082
My
GEM_PATH
also seems empty:Lukom commentedon Jan 13, 2020
It doesn't fix the error, but after running
command ruby works as expected
dorianmariecom commentedon Mar 2, 2020
happened to me while installing ruby 2.3.1 on macos 10.15.3
mehrad-meraji commentedon Mar 3, 2020
happened here as well ruby 2.3.0 on macos 10.15.3
1990prashant commentedon Mar 3, 2020
Happened here as well ruby 2.3.1 on macos 10.15.1
This is the error log
'Exception
LoadError' at /Users/anjalichouhan/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems.rb:1241 - cannot load such file -- rubygems/defaults/operating_system Exception
LoadError' at /Users/anjalichouhan/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems.rb:1250 - cannot load such file -- rubygems/defaults/rubyException
LoadError' at /Users/anjalichouhan/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- did_you_mean /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/core_ext/kernel_require.rb:54:in
require': cannot load such file -- openssl (LoadError)from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/core_ext/kernel_require.rb:54:in
require' from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/specification.rb:2481:in
to_ruby'from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/commands/setup_command.rb:405:in
install_default_bundler_gem' from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/commands/setup_command.rb:167:in
execute'from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/command.rb:321:in
invoke_with_build_args' from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/command_manager.rb:184:in
process_args'from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/command_manager.rb:148:in
run' from /Users/anjalichouhan/.rvm/src/rubygems-3.0.8/lib/rubygems/gem_runner.rb:59:in
run'from setup.rb:41:in `
DanielRuf commentedon Mar 24, 2020
Any solutions? Otherwise we have to switch to a different language and framework.
deivid-rodriguez commentedon Mar 24, 2020
If someone can provide a docker repro on a ruby that has not yet reached its end of life (ruby 2.4 or higher), I'm happy to at least have a look.
DanielRuf commentedon Mar 24, 2020
Switching to rbenv and testing if this works better.
DanielRuf commentedon Mar 24, 2020
Hm, rbenv has the same issue. Seems macOS is not great for this anymore.
rbenv/ruby-build#1169 (comment)
rotem-wald commentedon Apr 7, 2020
@DanielRuf Is there any new?
I did install RVM with the following guide: https://gist.github.com/denji/8706676 on macOS 10.15.4 and then installed Ruby 2.3.1. Got the same issue:
DanielRuf commentedon Apr 7, 2020
@rotem-wald I linked a workaround. I also switched to rbenv and still use macOS 10.14.
2 remaining items
CamJN commentedon Apr 22, 2020
The same is true of rubygems
3.1.1
and3.1.0
deivid-rodriguez commentedon Apr 22, 2020
@CamJN In the error you post, the command
env GEM_HOME=/usr/local/rvm/gems/ruby-2.1.10@global GEM_PATH= /usr/local/rvm/rubies/ruby-2.1.10/bin/ruby -d /usr/local/rvm/src/rubygems-3.1.2/setup.rb --no-document
is trying to install rubygems 3.1.2 on ruby 2.1. rubygems 3.1.2 does not support ruby 2.1, so I believe thervm
installer should never run such a command. Isrvm
running this command?Again, if anybody is really interested in getting this fixed, please work on providing repro steps.
Thanks!
CamJN commentedon Apr 22, 2020
@deivid-rodriguez ah, well that explains my problem. I was running
/usr/local/rvm/bin/rvm install ruby-$RUBY_VERSION --rubygems $RUBYGEMS_VSERSION
in my CI to install a bunch of rubies and the script sets the rubygems to the latest version. Had to lock it to3.0.8
for now. A message about known incompatible versions and then not trying to continue would have been much clearer to me FWIW.flexid commentedon Apr 25, 2020
I bumped into the same problems and tried most of the workarounds related to this issue. Skip brew openssl workarounds, what finally got it to work was the following for ruby 2.3.1 after restarting my computer and reinstalling rvm:
This was on macOS Catalina 10.15.4. Good luck!
elfotografo007 commentedon Apr 29, 2020
I had the same issue while trying to install ruby 2.2.2. RVM tries to install 3.0.8, but RubyGems 3.0.0+ requires Ruby 2.3. I found that the latest pre 3 Rubygems is 2.7.10. So, adding to @flexid's answer:
This was on macOS Catalina 10.15.4.
harish-aka-shivi commentedon May 3, 2020
Thanks, @elfotografo007, It worked for me. 👍
andreibondarev commentedon Jun 8, 2020
@elfotografo007 Didn't work for me trying to install
2.1.10
:(13 remaining items