views:

50

answers:

2

Hey there,
I'm a first time stackoverflow poster, long time reader.

I'm dipping the toes into Rails and I'm trying to get git working. I've installed git using the OSX git installer, and can see the manual with $man git. But I can't for the life of me get any other commands to work. I've restarted the terminal as well.

I'm on 10.5 if that's any help.

Any suggestions would be fantastic, and very much appreciated, thanks.

A: 

Where did the git binary get installed? Find out, and add that folder to your PATH.

Júlio Santos
+1  A: 

Try searching for it sudo find / -name *git* | grep bin and then, as suggested by Júlio, adding that folder to your $PATH.

Maran
/usr/local/git/bin/gitSorry to be a bit of a newbie here.When 'echo $PATH' I get:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexecHow do I add the folder to the path? The path looks a little screwy. Am I right in thinking this may also be why none of my gem installs really seems to work?
GalaxyLord
open ~/.bash_login with your favorite editor and this at the bottom: PATH=$PATH:/usr/local/git/bin/ . Open a new shell or do source ~/.bash_login and the git command should work.
Maran
Worked a treat, thanks mate!I think my multiple attempts at installing rails/ruby/etc has left my file structure in tatters. I'll have to format soon methinks.
GalaxyLord
Can you point me in the direction of learning more about PATH and such? I think I'm having the same problems installing RVM and would like to get a better understanding of what exactly I'm doing (ie. how bash interacts with installed gems, etc)
GalaxyLord
@GalaxyLord Perhaps this might help: http://www.troubleshooters.com/linux/prepostpath.htm . It's weird that you run into this much problems though. Shouldn't have happened. You should check your .bash_login files and see if anything is up in there. Seems like there is a bigger error at work.
Maran
export PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec# Your previous /Users/galaxylord/.bash_login file was backed up as /Users/galaxylord/.bash_login.macports-saved_2010-09-21_at_19:52:01# MacPorts Installer addition on 2010-09-21_at_19:52:01: adding an appropriate PATH variable for use with MacPorts.export PATH=/opt/local/bin:/opt/local/sbin:$PATHexport MANPATH=/opt/local/share/man:$MANPATH# Finished adapting your MANPATH environment variable for use with MacPorts.export PATH=$PATH:/usr/local/git/bin/
GalaxyLord
Sorry, I'm looking at how to format these replies correctly now!
GalaxyLord