gpt4 book ai didi

ruby-on-rails - Capistrano 和 Assets :precompile not working due to rake versioning issue

转载 作者:行者123 更新时间:2023-12-04 05:50:29 25 4
gpt4 key购买 nike

我在部署 capistrano 时遇到以下错误:

enter image description here

如果我从命令行运行该命令,我会得到以下信息:您已经激活了 rake 0.9.2,但是您的 Gemfile 需要 rake 10.0.3。使用 bundle exec 可以解决这个问题。

来 self 的 Gemfile

gem 'rake', '10.0.3'

当我查看 Gemfile.lock 时,我只看到三个提到 rake 的地方:

railties (3.1.10)
rake (>= 0.8.7)
rake (10.0.3)
rake (= 10.0.3)

这似乎将其固定在 10.0.3 应该没问题。

我为什么会收到这个消息,我该如何解决?如果我运行 gem uninstall rake 会发生什么? Capistrano 在那之后还能工作吗?

提前谢谢

编辑 1不同的 rake 版本:

root@curren:/data/sites/domain.com/apps/app-rails/current# rake -V
rake, version 0.9.2
root@curren:/data/sites/domain.com/apps/app-rails/current# bundle exec rake -V
rake, version 10.0.3

最佳答案

对于第 3 章:

SSHKit.config.command_map[:rake] = "bundle exec rake"

关于ruby-on-rails - Capistrano 和 Assets :precompile not working due to rake versioning issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14373637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com