# Installing from Git with current Rails version

**URL:** <https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377>\
**Category:** Rails\
**Created:** [November 28, 2008, 1:38pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377 "2008-11-28T13:38:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 1:38pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/1 "2008-11-28T13:38:07Z")

</div>

Hi,-

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

$ script/plugin install [GitHub - pyrat/wee\_lightbox: A wee rails plugin for integrating classic lightboxes into your rails app.](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:

> **[Git Support for Rails Plugins - The GitHub Blog](https://github.blog/2008-03-17-git-support-for-rails-plugins/)**
>
> Installing a Rails plugin from GitHub is now as simple as: ./script/plugin install git://github.com/pjhyett/auto\_migrations.git Sweet! Thanks to all involved for making it happen, the changeset is here. Now, to figure out gem support…

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

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 2:03pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/2 "2008-11-28T14:03:08Z")

</div>

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:  
> [Git Support for Rails Plugins | The GitHub Blog](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/](http://git.or.cz/) and all should be well.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/3 "2008-11-28T14:07:25Z")

</div>

Hi Peter,-

I had actually installed Git using this package:  
[http://code.google.com/p/git-osx-installer/](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:  
> > [Git Support for Rails Plugins | The GitHub Blog](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/](http://git.or.cz/) and all should be well.
> 
> Best regards
> 
> Peter De Berdt

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 2:20pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/4 "2008-11-28T14:20:44Z")

</div>

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

> I had actually installed Git using this package:  
> [Google Code Archive - Long-term storage for Google Code Project Hosting.](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

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/5 "2008-11-28T14:21:57Z")

</div>

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:  
> > [Google Code Archive - Long-term storage for Google Code Project Hosting.](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

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/6 "2008-11-28T16:41:51Z")

</div>

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

[http://www.freshblurbs.com/installing-git-os-x-3-minutes](http://www.freshblurbs.com/installing-git-os-x-3-minutes)

/ Vahagn

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 4:42pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/7 "2008-11-28T16:42:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/8 "2008-11-28T14:52:50Z")

</div>

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:  
> > > [Google Code Archive - Long-term storage for Google Code Project Hosting.](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

---

<div class="post-metadata">

**Author:** ![vahagn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Post date:** [November 28, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/installing-from-git-with-current-rails-version/154377/9 "2008-11-28T16:52:30Z")

</div>

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
