Forcing a specific version of gem to use by default?

Let's say I have three gems installed: package-0.4.0, package-0.5.0 and package-0.5.0-jbfink (I built -jbfink because I made minor changes to 0.5.0 and want to distinguish it from official releases ) Is there a stone (or another command) to make it the default? Right now I have all three installed, but my shell is collecting executables from the 0.5.0 package, and I would prefer it to be 0.5.0-jbfink by default.

Naming 0.5.0-jbfink to 0.5.1 fixes this problem, but I don't want to do this because I would rather not have conflicts with officially released 0.5.1 when it appears.

+6
ruby
source share
2 answers

go to config / environment.rb and specify the name of your jewel that 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

0
source share

if you want to choose a version from the command line, she likes

 $ gem_script_name _0.1.0_ arg1 arg2 ... 
0
source share

All Articles