Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined local variable or method `git_source' for Gemfile

Cloned a rails application from github, works on the original dev's machine using the same version of rails (5.0.1).

Any rails command run from the app directory fails with:

Undefined local variable or method `git_source' for 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
like image 599
user1456632 Avatar asked Dec 19 '22 10:12

user1456632


2 Answers

git_source was introduced in Bundler 1.6.0.

To update bundler run:

$ gem update bundler
like image 86
spickermann Avatar answered Jan 05 '23 01:01

spickermann


In your console, run…

gem update bundler
bundle install
like image 33
Igbanam Avatar answered Jan 05 '23 01:01

Igbanam