Gemfile未定义的局部变量或方法`git_source' [英] Undefined local variable or method `git_source' for Gemfile
本文介绍了Gemfile未定义的局部变量或方法`git_source'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从github克隆了一个rails应用程序,使用相同版本的rails(5.0.1)在原始开发人员的机器上工作。
Cloned a rails application from github, works on the original dev's machine using the same version of rails (5.0.1).
从应用程序运行任何rails命令目录失败:
Any rails command run from the app directory fails with:
Undefined local variable or method `git_source' for Gemfile
相关的Gemfile部分:
Relevant Gemfile section:
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
。
更新打包程序运行:
To update bundler run:
$ gem update bundler
这篇关于Gemfile未定义的局部变量或方法`git_source'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文