开发者

installed gems activated before frozen gems?

开发者 https://www.devze.com 2023-01-02 14:09 出处:网络
We\'re us开发者_C百科ing gems:unpack to ensure gem version consistency across environments. However, we\'re running into:

We're us开发者_C百科ing gems:unpack to ensure gem version consistency across environments. However, we're running into:

can't activate , already activated [GEM-VERSION]

Is this because installed gems take precedence over frozen ones? Is it possible to have frozen gems activate first? Advice on ways to keep gems consistent welcome.


This usually happens when a gem/plugin you have packed requires a gem then a second gem/plugin requires a specific version of the same gem. The first gem requires the dependency, but when the second gem requires the specified version of the same gem then you will see the error you describe.

For example:

some_gem requires special_gem
another_gem requires special_gem => 1.0

And you have the following:

Packed in app:
  special_gem 2.0
  some_gem 1.0
  another_gem 1.0

Installed Locally:
  special_gem 1.0, 2.0
  some_gem 1.0
  another_gem 1.0

Then the some_gem will require 2.0, but when another_gem requires 1.0 you get the error.

0

精彩评论

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