On Sat, May 22, 2010 at 2:47 PM, pepe [email protected] wrote:
Just in case it applies here is an extract from the Pickaxe book
(Second edition, page 217):
“Threre’s a subtlety when it comes to installing different versions of
the same application with RubyGems. Even though RubyGems keeps
separate versions of the application’s library files, it does not
version the actual command you use to run the application. As a
result, each install of an application effectively overwrites the
previous one.”
That’s actually not the whole story, and excerpt from the output of
gem help install:
Description:
The install command installs local or remote gem into a gem
repository.
For gems with executables ruby installs a wrapper file into the
executable
directory by default. This can be overridden with the --no-wrappers
option.
The wrapper allows you to choose among alternate gem versions using
version.
For example `rake _0.7.3_ --version` will run rake version 0.7.3 if
a newer
version is also installed.
The “actual command you use to run the application” is actually a bit
of boilerplate generated by gems which requires the gem and then calls
the executable in the bin directory of the gem. If you use that
{version} option it requires a specific version of the gem.
So if you have both rails 2.3.5 and 1.2.6 installed then either
rails
or
rails 2.3.5
will run version 2.3.5 which is the latest version installed. but
rails 1.2.6
will run version 1.2.6
HTH
BTW, the OP gave rails version 1.3.5 as a example, as far as I know
this a fictitious version since rails went from version 1.2.6 to
version 2.0.0
–
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale