I've been trying to install rubygems for hours, but it keeps failing. The error is:
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 that's difficult to read, I'm not exactly sure how to break it up.)
rubygems.install.log:
Top 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've tried reinstalling Xcode, made sure I've install xcode command line tools, Rvm, ruby 2.0.0, pretty much everything. I've also tried removing all the other ruby versions and rvm requirements doesn't tell me I need anything 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: Okay, now I'm getting the error:
/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 log.
Edit 3: Ran rvm requirements, nothing I didn't have already. Trying to install zlib gives me errors with configure and make.
Configure:
unknown option: --disable-shared
Make:
make: *** No rule to make target `install'. Stop.
Trying to configure and make manually (without the disable shared flag) removes the configure issue but leaves the make issue.
Edit 4:
So after a trying several different things, it suddenly worked. I decided to try rvm one last time, and everything worked fine. I'd post what I did, but I really have no idea.