How OpenID works
I stumbled upon this on youtube. It is the clearest explanation of OpenID I have come across.
Where has my gem_server gone?
Is it me or are there some stupid holes in Leopard? I will get round to writing up making Time Machine back up to a NAS some other time, but today I wasted on rubygems. What were those good people at Apple thinking when they decided to strip out gem_server from an otherwise solid job of integrating Ruby into Leopard?
First things first, if you want your gem_server back in Leopard report the bug to Apples Bug Reporter, enough voices and they will prioritise it.
Enough moaning, it is late and I want to drop this little tip while I still remember what I did so no other poor soul has to whittle away their time working out how to fill this pointless gap.
My first mistake was to think that the usual;
sudo gem update --system
Don't even think about doing this, but if you do and find yourself with an empty repository, all is not lost. You can get things back in order by putting the following into .gemrc in your home folder;
gemhome:
- /Library/Ruby/Gems/1.8
gempath:
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
Lets go get your gem_server. First things first, check your .profile has /opt/local/bin at the front of your PATH, and add the GEM_PATH and GEM_HOME. Your .profile should look something similar to mine;
export PATH="/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export PATH="~/bin:$PATH"
alias cap1="`which cap` _1.4.1_"
export GEM_PATH="/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8:/Library/Ruby/Gems/1.8"
export GEM_HOME="/Library/Ruby/Gems/1.8"
Now let's install a working RubyGems. Download rubygems and unpack it to /opt/local/src/rubygems-0.9.4. Now lets build it.
$ export GEM_HOME=/Library/Ruby/Gems/1.8
$ ruby setup.rb config --prefix=/opt/local
$ ruby setup.rb setup
$ ruby setup.rb install
You should now have a working gem_server, it will only be able to show you the gems you have installed and will ignore the ones pre installed by Apple, but if you want to view those all you have to do is;
$ export GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
$ gem_server
Note: Apparently instead of doing all of this, you can simply copy gem_server from the RubyGems distribution to /usr/bin. I haven' tried this but Laurent Sansonetti you can create it yourself:
#!/usr/bin/env ruby
require 'rubygems/server'
Gem::Server.run ARGV
