'Heroku bundle: command not found

I'm trying to deploy a Rails/ReactJS app on Heroku, and I've committed and pushed the app onto it. However, when I try to run any rake command, or bundler --version on the Heroku CLI, I get the following error:

bash: bundler: command not found

I've tried the following to no avail.

$ heroku config:set GEM_PATH=vendor/bundle/ruby/3.1.1
$ heroku config:set PATH=bin:vendor/bundle/ruby/3.1.1/bin:/usr/local/bin:/usr/bin:/bin

I'm on Ruby 3.1.1. Any help would be appreciated, thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source