1

我目前正在运行 Redmine,在更新 gems 时,Phusion Passenger 抛出错误,无法找到所需的库。似乎它一直在寻找较旧的宝石,而不是较新的宝石。

更新 gem 后,我运行命令:

gem cleanup

删除不再需要的所有旧宝石。

不幸的是,尽管安装了较新的 gem,Phusion Passenger 仍然抛出以下错误:

Could not find activesupport-3.2.11 in any of the sources (Bundler::GemNotFound)

activesupport-3.2.12但是已经安装了。

为了暂时解决这个问题,我需要重新安装旧版本。不幸的是,我需要安装所有旧版本的依赖项......有没有办法让 Phusion Passenger 看到所需宝石的新版本?我对 Ruby、Rails 或 gems 知之甚少,因此感谢我在此问题上获得的任何帮助。

谢谢你

编辑:根据请求,这里是输出gem dependency activesupport -reverse-dependencies

Gem activesupport-3.2.12
  i18n (~> 0.6)
  multi_json (~> 1.0)
  Used by
    actionpack-3.2.12 (activesupport (= 3.2.12))
    activemodel-3.2.12 (activesupport (= 3.2.12))
    activerecord-3.2.12 (activesupport (= 3.2.12))
    activeresource-3.2.12 (activesupport (= 3.2.12))
    rails-3.2.12 (activesupport (= 3.2.12))
    railties-3.2.12 (activesupport (= 3.2.12))
    treetop-1.4.12 (activesupport (>= 0, development))

编辑:我想我找到了问题的根源:Redmine 目录中的那个Gemfile和那个。Gemfile.lockGemfile.lock文件中,它列出了以下内容:

specs:
    actionmailer (3.2.11)
    actionpack (= 3.2.11)
    mail (~> 2.4.4)
    actionpack (3.2.11)
    activemodel (= 3.2.11)
    activesupport (= 3.2.11)
    builder (~> 3.0.0)
    erubis (~> 2.7.0)
    journey (~> 1.0.4)
    rack (~> 1.4.0)
    rack-cache (~> 1.2)
    rack-test (~> 0.6.1
    ...

所以,这很可能是导致所有问题的文件......现在,如何解决这个问题?

4

1 回答 1

1

您必须执行以下操作:

打开 Redmine Gemfile(应该位于 redmine 项目的根目录)。在该文件中,您将更新gems. 在终端中,转到 Redmine 项目的根目录(与 Gemfile 所在的级别相同),然后执行bundle install. 这将更新您的gems并将您的替换Gemfile.lock为列出新宝石的新宝石。

于 2013-03-18T14:59:32.230 回答