开发者

How to force Rails to use gem of version X

I have a rails app with the config/environment.rb line

config.gem 'authlogic', :version => '2.1.2'

The sy开发者_JS百科stem gem for authlogic is 2.1.4 The one in my GEM_PATH is 2.1.2

No matter what I try, Rails is only using the 2.1.4 version, which is a problem. How to force rails to use 2.1.2?

Thanks


I recommend using Bundler


i've made a test here, included the gem authlogic, choose to use the 2.1.3 version, and the application ran without problems.

then i've uninstalled the gem (gem uninstall authlogic -v=2.1.3), and my application didn't ran anymore, normal behavior (i'm using rails 2.3.8 for this test)

you could try uninstalling and then installing the gem again


To be safe, uninstall your 2.1.4 version, freeze 2.1.2, then uninstall 2.1.2 too.


Unpack the gems into your rails app. This'll also help in deployment.

rake gems:unpack


Sys admin re-installed some gems and all the problems went away.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜