You need to install git to be able to use gems from git repositories.

Trying to use the latest verison of devise gem in my gemfile:

gem ‘devise’, github: “heartcombo/devise”, branch: “main”

but am getting this error when i try to deploy. tried ssh into the vm to manually install git but still getting the error?

full error message:

 => ERROR [build 3/6] RUN bundle _2.3.15_ install &&     bundle exec boot  3.7s
------                                                                          
 > [build 3/6] RUN bundle _2.3.15_ install &&     bundle exec bootsnap precompile --gemfile:
#12 1.622 Fetching gem metadata from https://rubygems.org/..........
#12 3.651 Fetching https://github.com/heartcombo/devise.git
#12 3.673 You need to install git to be able to use gems from git repositories. For help
#12 3.673 installing git, please refer to GitHub's tutorial at
#12 3.673 https://help.github.com/articles/set-up-git
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c bundle _${BUNDLER_VERSION}_ install &&     bundle exec bootsnap precompile --gemfile]: exit code: 11

Try running:

bin/rails generate dockerfile

and accept the changes and redeploy

1 Like

this did the trick, thanks!