From: Ryan Davis Date: 2012-12-05T19:58:53+09:00 Subject: Re: how to require specific version of gem in my project On Dec 5, 2012, at 01:27 , Mallikarjuna Yaddala wrote: > Hi All, > > I have installed two different versions of a gem (1.0.0 and 1.0.4) > > > My code : > > =============================== > > require 'test' , '>= 1.3.6' require doesn't take 2 args (as it doesn't makes sense to be able to require across 2+ versions of the same gem). From the rdoc: % ri require ... === Implementation from Kernel ------------------------------------------------------------------------------ require(string) => true or false ... You want to specify that at the gem level using #gem: % ri gem ... (from gem rubygems-1.8.24) === Implementation from Kernel ------------------------------------------------------------------------------ gem(gem_name, *requirements) ... So you want: gem "test", ">= 1.3.6" # assuming the gem name is actually "test" require "test" # assuming there is a file "test.rb" in the gem BUT... also note that your version specifier above will NOT match either version you have installed.