Matthew LS

Joined

70 Experience
0 Lessons Completed
0 Questions Solved

Activity

Some time recently, my app started throwing fatal: not a git repository (or any of the parent directories): .git on the server. It shows up if I ever remote in and run a bundle exec command (e.g. RAILS_ENV=production bundle exec rails console) and it also shows up in the Capistrano logs when I deploy. The weird thing is, it doesn't seem to start happening during the deploy until after Capistrano runs bundler:install:

00:08 bundler:config
      01 $HOME/.rbenv/bin/rbenv exec bundle config --local deployment true
    ✔ 01 deploy@web01.moore.edu.au 0.265s
      02 $HOME/.rbenv/bin/rbenv exec bundle config --local path /home/deploy/philoi/shared/bundle
    ✔ 02 deploy@web01.moore.edu.au 0.267s
      03 $HOME/.rbenv/bin/rbenv exec bundle config --local without development:test
    ✔ 03 deploy@web01.moore.edu.au 0.241s
00:10 bundler:install
      The Gemfile's dependencies are satisfied, skipping installation
00:10 deploy:assets:precompile
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 fatal: not a git repository (or any of the parent directories): .git
      01 fatal: not a git repository (or any of the parent directories): .git
      01
      01 Rebuilding...
<snip>
00:15 deploy:migrating
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate
      01 fatal: not a git repository (or any of the parent directories): .git
      01 fatal: not a git repository (or any of the parent directories): .git

That seems like a huge clue but I don't know where to look next (particularly since in the above case bundler:install was skipped).

Reading a very old SO question and an even older bundler issue on GitHub I suspect maybe this started happening when I switched from a published gem to pulling it from the main branch on GitHub (the published version doesn't yet support Rails 8).

Does anyone have any suggestions on how to test my suspicions? I suppose I could add a staging environment so I can play around with the Gemfile 🤔

I'm stuck too...

  • I've run brew install opencv to install opencv 4
  • I then tried to install the gem supplying the relevant paths from homebrew: gem install ruby-opencv -- --with-opencv-lib=/opt/homebrew/Cellar/opencv/4.10.0_15/lib --with-opencv-include=/opt/homebrew/Cellar/opencv/4.10.0_15/include but I get the same error mentioned above
  • If I tell it to skip the missing "contrib" folder by adding --without-opencv_contriblib to the end, it skips that check and fails on the next one 🤷‍♂️

    Check the required libraries...
    checking for -lstdc++... yes
    checking for -lopencv_calib3d... yes
    checking for -lfalse... no
    *** extconf.rb failed ***

Posted in Not all ActionCable broadcasts broadcasting

I'm trying to figure out a similar problem... I don't have an answer yet but I was able to get a bit more information in development by opening the turbo-rails gem (gem open turbo-rails) and adding some puts debugging to the method I'm trying to figure out (broadcasts_refreshes).

You could do something similar in production to add some targeted logging to the method that isn't working?