Installing from Git with current Rails version


#1

Hi,-

I’m trying without success to install a plugin from Git using the
command:

$ script/plugin install http://github.com/pyrat/wee_lightbox.git

What I get is:

removing: /Users/vahagn/myapp/vendor/plugins/wee_lightbox/.git
sh: git: command not found

Then I checked this page:

And it says this is only possible using Edge Rails. Does anyone know if
this still holds true, or maybe my mistake lies elsewhere?

Rails version: 2.1.1

Thanks!

/ Vahagn


#2

On 28 Nov 2008, at 13:38, Vahagn H. wrote:

removing: /Users/vahagn/myapp/vendor/plugins/wee_lightbox/.git
sh: git: command not found

Then I checked this page:
http://github.com/blog/25-git-support-for-rails-plugins

And it says this is only possible using Edge Rails. Does anyone know
if
this still holds true, or maybe my mistake lies elsewhere?

It’s just telling you that you don’t have git installed. Install git
from http://git.or.cz/ and all should be well.

Best regards

Peter De Berdt


#3

Hi Peter,-

I had actually installed Git using this package:
http://code.google.com/p/git-osx-installer/

but maybe it is not the newest version?

Best regards,
Vahagn

Peter De Berdt wrote:

On 28 Nov 2008, at 13:38, Vahagn H. wrote:

removing: /Users/vahagn/myapp/vendor/plugins/wee_lightbox/.git
sh: git: command not found

Then I checked this page:
http://github.com/blog/25-git-support-for-rails-plugins

And it says this is only possible using Edge Rails. Does anyone know
if
this still holds true, or maybe my mistake lies elsewhere?

It’s just telling you that you don’t have git installed. Install git
from http://git.or.cz/ and all should be well.

Best regards

Peter De Berdt


#4

On 28 Nov 2008, at 14:07, Vahagn H. wrote:

I had actually installed Git using this package:
http://code.google.com/p/git-osx-installer/

but maybe it is not the newest version?

Then it might just be that /usr/local/git is not in your path.

In the terminal, do:
which git

If git can be found, it will say something like: /usr/local/git/bin/git
If nothing is returned, it doesn’t find the git application. If so,
add this to your ~/.bash_login file (if it doesn’t exist, create it):

PATH="/usr/local/git/bin:/usr/local/git:${PATH}"
export PATH

Then close the terminal session and start a new one.

Best regards

Peter De Berdt


#5

Thanks a lot! Will give it a try.

All the best, Vahagn

Peter De Berdt wrote:

On 28 Nov 2008, at 14:07, Vahagn H. wrote:

I had actually installed Git using this package:
http://code.google.com/p/git-osx-installer/

but maybe it is not the newest version?

Then it might just be that /usr/local/git is not in your path.

In the terminal, do:
which git

If git can be found, it will say something like: /usr/local/git/bin/git
If nothing is returned, it doesn’t find the git application. If so,
add this to your ~/.bash_login file (if it doesn’t exist, create it):

PATH="/usr/local/git/bin:/usr/local/git:${PATH}"
export PATH

Then close the terminal session and start a new one.

Best regards

Peter De Berdt


#6

Issue resolved! One must configure Git BEFORE sudo make install:

http://www.freshblurbs.com/installing-git-os-x-3-minutes

/ Vahagn


#7

On 28 Nov 2008, at 13:52, Vahagn H. wrote:

Sorry, but something seems to be wrong here. I’ve added the path, so
now
I have:

$ cat .bash_login
PATH="/usr/local/git/bin:/usr/local/git:${PATH}"
export PATH

What does echo $PATH
output?
Personally I can never remember the difference
between .bash_login, .bash_profile, .bash_rc etc…
In 10.5 at least there is another mechanism:
if you create a file in /etc/paths.d containing the path you want then
that will be added to the search list.

Fred


#8

Sorry, but something seems to be wrong here. I’ve added the path, so now
I have:

$ cat .bash_login
PATH="/usr/local/git/bin:/usr/local/git:${PATH}"
export PATH

Also git is there:

$ ls /usr/local/git/bin/
git git-shell gitk
git-cvsserver git-upload-archive
git-receive-pack git-upload-pack

But $ which git just gives a blank new line! I’ve tried restarting the
Mac, but nothing.

Really mystified here, any help help appreciated!

/ Vahagn

Vahagn H. wrote:

Thanks a lot! Will give it a try.

All the best, Vahagn

Peter De Berdt wrote:

On 28 Nov 2008, at 14:07, Vahagn H. wrote:

I had actually installed Git using this package:
http://code.google.com/p/git-osx-installer/

but maybe it is not the newest version?

Then it might just be that /usr/local/git is not in your path.

In the terminal, do:
which git

If git can be found, it will say something like: /usr/local/git/bin/git
If nothing is returned, it doesn’t find the git application. If so,
add this to your ~/.bash_login file (if it doesn’t exist, create it):

PATH="/usr/local/git/bin:/usr/local/git:${PATH}"
export PATH

Then close the terminal session and start a new one.

Best regards

Peter De Berdt


#9

Hi Fred, seems like our comments have crossed each other. Still in the
high name of knowledge sharing here’s the answer:

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin
$ which git
/usr/local/bin/git

Thanks for the tip with /etc/paths.d. I was initially also taken aback
by the ~/.bash_login file, because on my machine there’s a file at root
level named #.bash_profile# . When I cat this file, nothing comes out of
it. Yet when I open it in a text program the contents are the same as in
the (hidden!) ~/.bash_login file! What most strange is when I do a ls -a
BOTH these files are displayed:

#.bash_login#
.

.CFUserTextEncoding
.DS_Store
.Trash
.Xauthority
.Xcode
.bash_history
.bash_login
.bash_profile
.csh_history
.
.
.
etc

Must be Leopard’s way of telling you that this file is important
somehow. Strange, as it looks like information duplication.

/ Vahagn

Frederick C. wrote:

On 28 Nov 2008, at 13:52, Vahagn H. wrote:

Sorry, but something seems to be wrong here. I’ve added the path, so
now
I have:

$ cat .bash_login
PATH="/usr/local/git/bin:/usr/local/git:${PATH}"
export PATH

What does echo $PATH
output?
Personally I can never remember the difference
between .bash_login, .bash_profile, .bash_rc etc…
In 10.5 at least there is another mechanism:
if you create a file in /etc/paths.d containing the path you want then
that will be added to the search list.

Fred