From: Brian Candler Date: 2008-04-11T20:18:48+09:00 Subject: Trying (and failing) to load specific version of gem I wonder if someone can help with a problem which I'm sure is very simple and obvious, but I'm tearing my hair out. I have rubygems 1.0.1 installed. I have two gems of ActiveRecord installed (1.15.3 and 2.0.2). I simply want a program to run using 1.15.3. Here are the different ways I've tried to do it, all of which fail with the exceptions shown: require 'rubygems' gem 'activerecord', '=1.15.3' ActiveRecord # >> uninitialized constant ActiveRecord require 'rubygems' gem 'activerecord', '=1.15.3' require 'activerecord' # >> can't activate activerecord (= 2.0.2), already activated activerecord-1.15.3] require 'rubygems' require_gem 'activerecord', '=1.15.3' # >> undefined method require_gem require 'rubygems' require 'activerecord', '=1.15.3' # >> wrong number of arguments (2 for 1) require 'rubygems' require 'gemconfigure' Gem.configure([['activerecord','=1.15.3']]) ActiveRecord # >> uninitialized constant ActiveRecord require 'rubygems' require 'gemconfigure' Gem.configure([['activerecord','=1.15.3']]) require 'activerecord' # >> can't activate activerecord (= 2.0.2), already activated activerecord-1.15.3] I see that rubygems-1.1.0 and 1.1.1 have now been released, but see nothing in the changelogs which suggest that this was a known or fixed issue. Equally, this is such core behaviour that it can't be broken, or someone else would have noticed, so I'm sure I'm simply doing it wrong. Could someone enlighten me please? I am failing to get it to DWIM :-) Thanks, Brian.