Reputation: 841
When putting git: dependency in the pubspec. I get the following error:
'Running pub install' has encountered a problem. ... ... ... Please ensure Git is correctly installed.
My git is installed at version 1.8.0 that I can access via the terminal on my Mac OS X 10.7.5.
Thank you in advance for any help.
Upvotes: 2
Views: 848
Reputation: 841
I decided to just navigate to the dart project folder and run pub install
on the terminal.
Upvotes: 1
Reputation: 33
I think the problem is that git's path is loaded to PATH
only on terminal start up. Terminal does this by running a file ~/.profile
or ~/.bash_profile
that often exports the paths to commonly used programs. As a consequence, a GUI app such as the Dart Editor can't 'see' git as it doesn't run this start up file.
There is a way to make certain paths visible to all applications though.
See: https://serverfault.com/questions/16355/how-to-set-global-path-on-os-x/277034
Upvotes: 3
Reputation: 30212
Try creating a file:
/etc/paths.d/git
With the following contents:
/usr/local/git/bin/
If your Git installation is located somewhere else, then use the path accordingly.
Upvotes: 2