Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sourcetree not finding installed bundler

Martin Sommer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2025

I am doing Ruby development with Git, and have bundler (default: 2.7.2) installed.

When I do a Commit in Sourcetree, I receive the error `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.7.2) required by ...`.

If I do the same `git commit` from the MacOS console, it works.

Why would Sourcetree not be able to see my installed `bundler`?

1 answer

0 votes
Tomislav Tobijas
Community Champion
November 20, 2025

Hi @Martin Sommer ,

It might be that this is caused by a difference in environment variables - especially PATH - between Mac terminal and the environment that Sourcetree uses to run Git commands.

What I've managed to dig out is:

When you use the terminal, your shell loads your user profile and environment, so Ruby and Bundler are found as expected. Sourcetree, however, may launch as a GUI app and not inherit your shell’s environment, so it defaults to the system Ruby (2.6) instead of your configured Ruby (2.7.2), and cannot find the correct Bundler version

...

The workaround is to ensure that Sourcetree is launched from a terminal window (so it inherits your shell environment), or to explicitly configure the PATH and Ruby environment variables within Sourcetree’s preferences or via a wrapper script.

So, you could try to launch Sourcetree from the terminal, and/or set environment variables via a wrapper script and set Git executable to your wrapper script (in Sourcetree).

I haven't played much with this (+ I'm on Windows), so I'm not sure if this will work. 🤔

Cheers,
Tobi

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events