7

I'm trying to run heroku run rake db:migrate but I continuously get this error message:

Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). I have seen people say just type in Git Init, but when I type in that, I just get

fatal: Not a git repository (or any parent up to mount point /app) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: Not a git repository (or any parent up to mount point /app) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: Not a git repository (or any parent up to mount point /app) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: Not a git repository (or any parent up to mount point /app) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Kindly guide me..

Uzma Manzor
  • 169
  • 1
  • 10
  • FWIW. I've had the similar error message for my python/django app, which was triggered by a 3rd party module poorly setup. – tamizboule Jan 05 '21 at 22:52

2 Answers2

2

You can turn off the behavior AND and warning by exporting GIT_DISCOVERY_ACROSS_FILESYSTEM=1.

Specifically, on Heroku, if you heroku config:set GIT_DISCOVERY_ACROSS_FILESYSTEM=1 the warning will go away.

It's probably because you are building a gem from source and the gemspec shells out to git, like many do today. So, you'll still get the warning fatal: Not a git repository (or any of the parent directories): .git but addressing that is for another day :)

My answer is a duplicate of:

BF4
  • 1,076
  • 7
  • 23
  • Setting `GIT_DISCOVERY_ACROSS_FILESYSTEM=1` will turn it `ON` not off. Also this is slightly misleading because while it gets rid of the warning, it doesn't address the issue git is facing. You will need to publish the gem you are sourcing locally. See here: https://stackoverflow.com/questions/6800074/custom-ruby-gem-in-gemfile-on-heroku – Joseph Cho Nov 21 '18 at 16:26
  • Disagree . Everything works as described. No need to publish gem locally. – BF4 Mar 19 '19 at 12:53
0

try

  heroku run bundle exec rake db:migrate
z.shan
  • 341
  • 1
  • 2
  • 13
  • Just type git init into your command line and press enter. Then run your command again, you probably were running git remote add origin [your-repository] – z.shan Jul 25 '16 at 08:06