Unable to install rubygems with ruby ​​2.0.0

I try to install rubygems for several hours, but it continues to fail. Mistake:

Installing rubygems-2.0.3 for ruby-2.0.0-p0.............................................................................................................................. Error running 'env GEM_PATH=/Users/Chris/.rvm/gems/ruby-2.0.0-p0:/Users/Chris/.rvm/gems/ruby-2.0.0-p0@global:/Users/Chris/.rvm/gems/ruby-2.0.0-p0:/Users/Chris/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/Users/Chris/.rvm/gems/ruby-2.0.0-p0 /Users/Chris/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -d /Users/Chris/.rvm/src/rubygems-2.0.3/setup.rb --verbose', please read /Users/Chris/.rvm/log/ruby-2.0.0-p0/rubygems.install.log 

(Sorry if this is hard to read, I'm not quite sure how to break it.)

rubygems.install.log:

A few lines:

 [2013-03-21 06:55:13] /Users/Chris/.rvm/rubies/ruby-2.0.0-p0/bin/ruby Exception `LoadError' at /Users/Chris/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb:1073 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at /Users/Chris/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb:1082 - cannot load such file -- rubygems/defaults/ruby mkdir -p /Users/Chris/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0 mkdir -p /Users/Chris/.rvm/rubies/ruby-2.0.0-p0/bin 

Full file: Pastebin

I tried reinstalling Xcode, making sure that I had the xcode, Rvm, ruby ​​2.0.0 command line tools installed, almost everything. I also tried uninstalling all the other ruby ​​versions, and the rvm requirements do not tell me that I need something that I don't have.

Does anyone know what could be causing this?

EDIT: Also, I just managed to reinstall 1.9.3, with rubygems 1.9.3, absolutely fine.

EDIT2: Ok, now I get the error message:

 /Users/Chris/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- zlib (LoadError) 

in the journal.

Edit 3: Ran rvm requirements, I had nothing. Trying to install zlib gives me configuration and make errors.

Setup:

 unknown option: --disable-shared 

Mark:

 make: *** No rule to make target `install'. Stop. 

Trying to configure and do it manually (without disabling the common flag) resolves the configuration problem, but leaves the issue with the release.

Change 4:

So, after several attempts, it unexpectedly worked. I decided to try rvm for the last time and everything worked fine. I would post what I did, but I really don't know.

+8
ruby rubygems zlib macos
source share
4 answers

I think you are missing some libraries when installing type ruby

 rvm requirements 

and see which libraries you are missing, and install them, in particular install zlib pkg, and you also need to reinstall ruby

 rvm pkg install zlib rvm reinstall ruby 

I use ubuntu, so I can install libraries like this

 sudo apt-get install zlib1g-dev rvm reinstall ruby 
+1
source share

Refer to this question. Problems installing ruby-2.X using RVM

to a large extent

 $ rvm remove 2.0.0 # get rid of unsuccessful installation $ rvm get head --autolibs=3 # get the latest RVM and build required libs $ rvm requirements # just in case, install all other required stuff $ rvm install ruby-2.0.0 
+1
source share

I tried

 $ rvm remove 2.0.0 # get rid of unsuccessful installation $ rvm get head --autolibs=3 # get the latest RVM and build required libs $ rvm requirements # just in case, install all other required stuff $ rvm install ruby-2.0.0 

But that did not work. Ruby 2.0.0 seems to be installed successfully.

I open a new terminal, then

 rvm use 2.0.0 rvm rubygems latest 

It works. Hope this helps.

+1
source share

This is the expected result when starting with ruby ​​-d. There is nothing wrong with that.

0
source share

All Articles