views:

134

answers:

1

I have tryed to run this code in my console:

script/plugin install git://github.com/apotonick/cells.git

...but i only get an empty folder named "cells" in my "vendor/plugins" dir. What's wrong?

+1  A: 

Check you Git version.
This may be related with you gitconfig file, as described in this thread

The reason is that it appears rails-2.3.5/lib/commands/plugin.rb is trying use git pull to grab the plugin code (see the install_using_git method), which doesn't work right. Example:

script/plugin install git://github.com/fesplugas/typus.git
mkdir vendor/plugins/typus
cd vendor/plugins/typus
git init
git pull --depth 1 git://github.com/fesplugas/typus.git

That last line exits 1, but that error is being masked by the install_using_git method, and the directory is just rm -rf'ed.

I tracked this down to a conflict with ~/.gitconfig. If I remove these lines it works:

 [branch "master"]
   remote = origin
   merge = refs/heads/master

It appears a naked git pull has problems with these settings.

Actually, the problem would be here because of a global git config file (in your homedir: '~/.gitconfig'), defining a master which may be incompatible with the master expected by the git pull within that specific Git repo.

VonC
when I do:"git --version" i get: "Unknown command 'git --version'. Type 'help' to show the list of available commands."
Totty
@Totty: that means either that Git is not installed, or that it is not added to your `$PATH`
VonC
thats the problem, i dont really understand what is all this git stuff, i went to their site, but i still dont get it :s
Totty
@Totty: the first issue to solve is your Git installation. Can you make sure you have it properly installed? On which OS are you using it?
VonC