Let's say I've got three gems installed: package-0.4.0, package-0.5.0, and package-0.5.0-jbfink (I've built the -jbfink one because I made very minor alterations to 0.5.0's source and want to distinguish it from the official releases) . Is there a gem (or other command) to make one the default? Right now I've got all three installed, but my shell is picking up executables from package-0.5.0, and I'd rather it default to 0.5.0-jbfink.
Naming 0.5.0-jbfink to 0.5.1 fixes this problem, but I don't want to do that because I'd rather not have conflicts with an officially rele开发者_开发问答ased 0.5.1 when it comes along.
go to config/environment.rb and specify your gem name a version you would like to use
config.gem 'will_paginate', :version => '~> 2.3.11'
or
config.gem 'RedCloth', :version => '3.0.4', :lib => 'redcloth'
Hope this is what you are looking for ;) Petr
if you want to pick a version from the commandline, it's like
$ gem_script_name _0.1.0_ arg1 arg2 ...
精彩评论