Has Rails 5 a dependency on Git?
Asked Answered
G

2

8

We migrated our app from Rails 4 to Rails 5. We run it inside Docker. On our host system we of course have the git binaries, but not inside Docker. Running Puma inside Docker will give this error message, and I would like to get rid of it:

bin/rails: No such file or directory - git

Rspec will give this error message:

/usr/local/bundle/bin/rspec: No such file or directory - git

What gem has the dependency on git? Or is it one of the core Rails gems and should I just ignore the error message?

Glyptograph answered 9/9, 2017 at 21:59 Comment(1)
yeah this feels like your application / dependency gem is looking for some local folder ./git rather than git the program as a dependency. If this was a git the program issue it would look for ./.git not ./git (one dot missing)Gristede
G
1

Bundler has an optional dependency on git.

As described here, you can import gems directly from a git repository.

Check your Gemfile to see if any of your dependencies are installing from git. If none are, one of the gems you're installing probably is.

Galliot answered 24/9, 2017 at 12:54 Comment(0)
F
0

The message seems to me like you don't have the rails binaries set. Did you try creating the binstubs first?

bundle binstubs rails

and then bin/rails should work

Reference: https://github.com/rbenv/rbenv/wiki/Understanding-binstubs#bundler-generated-binstubs

Fiasco answered 10/9, 2017 at 10:55 Comment(2)
The Puma web server and rspec run both fine, the git thing is just a warning. So the Rails binaries are set.Glyptograph
rspec and puma have their own executables thoughWendy

© 2022 - 2024 — McMap. All rights reserved.