gpt4 book ai didi

ruby-on-rails - Gemfile 的未定义局部变量或方法 `git_source'

转载 作者:数据小太阳 更新时间:2023-10-29 08:35:52 25 4
gpt4 key购买 nike

从 github 克隆了一个 rails 应用程序,使用相同版本的 rails (5.0.1) 在原始开发人员的机器上工作。

从 app 目录运行的任何 rails 命令都会失败:

Undefined local variable or method `git_source' for Gemfile

相关的 Gemfile 部分:

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

最佳答案

git_source在 Bundler 1.6.0 中引入。

要更新捆绑程序运行:

$ gem update bundler

关于ruby-on-rails - Gemfile 的未定义局部变量或方法 `git_source',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41619741/

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