开发者

forcing a specific gem version as the default?

开发者 https://www.devze.com 2023-01-10 03:12 出处:网络
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 dist

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 ...
0

精彩评论

暂无评论...
验证码 换一张
取 消