1

I'm having trouble installing RubyGems on my Mac OS X Lion operating system.

I get all sorts of errors saying invalid date specification.

Please help, and thanks in advance!

/Lasse

Lasse Bunk
  • 1,848
  • 20
  • 21
  • Can you post your error messages you can use https://gist.github.com/ to post error messages or code snippets – bulleric Apr 10 '12 at 10:20
  • Sure – https://gist.github.com/2350304 – thanks in advance! – Lasse Bunk Apr 10 '12 at 10:38
  • Why does the RubyGems suddenly don't work? Is it due to some update of the RubyGems command? Now suddenly RubyGems work but when installing Rails 3.2.3 it doesn't include any dependencies :-/ – Lasse Bunk Apr 12 '12 at 12:30

2 Answers2

1

do you use rvm to administrate your gems? if not i approve to use it.

With Rvm it is easy to manage your ruby versions and with it you can install rubygems without any problems:

additionally i found some answers to your "Invalid gemspec" error:

but i recommend you to use Rvm to install rubygems

Community
  • 1
  • 1
bulleric
  • 2,077
  • 6
  • 21
  • 36
  • You need to install a C compiler to build Ruby. It's probably simplest to install [Xcode](https://developer.apple.com/xcode/). – Brandan Apr 10 '12 at 11:11
  • try to install ruby with gcc clang rvm install 1.9.3 --with-gcc=clang or rvm install 1.9.2 --with-gcc=clang – bulleric Apr 10 '12 at 11:12
  • @Brandan: Why is this necessary? – Lasse Bunk Apr 10 '12 at 12:05
  • Because osx does not get a gcc compiler and the installation for many gems need one you can use xcode or the osx-gcc-installer (xcode is free aviable in the appstore) – bulleric Apr 10 '12 at 12:09
  • Some of Ruby is written in C, so of you're building from source code (as rvm does), you need a C compiler. – Brandan Apr 10 '12 at 12:53
1

Installing Command Line Tools from Xcode > Preferences > Downloads solved the problem, and I can now use RubyGems and Ruby on Rails.

Lasse Bunk
  • 1,848
  • 20
  • 21