defunkt / cijoe

CI Joe is a fun Continuous Integration server. Unmaintained.
MIT License
1.05k stars 129 forks source link

Error calling git config, is a recent version of git installed? #28

Closed leemhenson closed 13 years ago

leemhenson commented 14 years ago

Hi

Freshly installed ruby-1.9.2-p0 via rvm, Ubuntu 10.04:

$ gem install cijoe
$ cijoe my-github-repo
cd: 1: can't cd to [/home/leemhenson/src/github/my-github-repo]
/home/leemhenson/.rvm/gems/ruby-1.9.2-p0/gems/cijoe-0.7.0/lib/cijoe/config.rb:25:in `to_s': Error calling git config, is a recent version of git installed? Command: "cd [\"/home/leemhenson/src/github/my-github-repo\"] && git config cijoe.user", Error: "", Status: Process::Status: pid 14569 exit 2 (RuntimeError)
    from /home/leemhenson/.rvm/gems/ruby-1.9.2-p0/gems/cijoe-0.7.0/lib/cijoe/server.rb:73:in `project_path='
    from /home/leemhenson/.rvm/gems/ruby-1.9.2-p0/gems/sinatra-1.0/lib/sinatra/base.rb:706:in `set'
    from /home/leemhenson/.rvm/gems/ruby-1.9.2-p0/gems/cijoe-0.7.0/lib/cijoe/server.rb:68:in `start'
    from /home/leemhenson/.rvm/gems/ruby-1.9.2-p0/gems/cijoe-0.7.0/bin/cijoe:51:in `'
    from /home/leemhenson/.rvm/gems/ruby-1.9.2-p0/bin/cijoe:19:in `load'
    from /home/leemhenson/.rvm/gems/ruby-1.9.2-p0/bin/cijoe:19:in `
' $ which git /usr/bin/git $ git --version git version 1.7.0.4

I'm inexperienced with ruby and ubuntu, so I might be missing something obvious. The status code of 2 from the "cd ...&& git config cijoe.user" command would seem to be the issue though. I can't find anything definitive of what that means? Some dodgy config on my system maybe?

Any help appreciated!

Cheers Lee

andyw8 commented 14 years ago

Seeing this also on Ubuntu:

$ which git /usr/local/bin/git $ git --version git version 1.6.4.3

andyw8 commented 14 years ago

Resolved - this was due to the server being on Ruby 1.9.2. I changed to 1.8.7 and it works.

stouset commented 14 years ago

That doesn't sound resolved to me.

stouset commented 14 years ago

The issue seems to be that project_path is being passed to Cijoe::Config as an Array under some circumstances.

matthewford commented 13 years ago

Has this too, fixed it locally on my branch. Pull request in #35 (note need to explicitly pass the project_dir -dir path)

defunkt commented 13 years ago

Stop Choice.rest from returning an Array in 1.9. Closed by 219796ad662a1192a07fd820c380f2103c0c8f68