scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 57 forks source link

spawn: can't convert nil into string #20

Closed tukinu closed 11 years ago

tukinu commented 11 years ago

hello, I just installed dandelion but I get an error everytime I try to connect: ....Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:162:in `spawn': can't convert nil into string

I'm on a windows 7 machine with a fresh version of ruby and dandelion 0.3.8. I guess is not really a dandelion problem but maybe someone can help me.

Thanks a lot for any support.

scttnlsn commented 11 years ago

Do you have a stack trace? My guess is that the error is coming from the "Grit" library that Dandelion uses to interact with the Git repo.

tukinu commented 11 years ago

hey and thanks for the answer. you mean this one? ..Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0 .3.6/lib/posix/spawn.rb:162:in spawn': can't convert nil into String (TypeError) from ..Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:162:inspawn' from ..Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:307:in popen4' from ..Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn/child.rb:105:inexec!' from ..Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn/child.rb:80:in initialize' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:345:innew' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:345:in native' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git.rb:372:inmethod_missing' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git-ruby.rb:110:in rev_parse' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/git-ruby.rb:66:inrev_list' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/commit.rb:120:in find_all' from ..Ruby193/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/repo.rb:427:incommit' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/git.rb:57:in initialize' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:23:innew' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:23:in initialize' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:72:ininitialize' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:12:in new' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:12:increate' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/command.rb:122:in deployment' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/command/deploy.rb:30:inexecute' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/application.rb:38:in block in execute' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/command.rb:92:ininitialize' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/application.rb:36:in new' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/application.rb:36:inexecute' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/lib/dandelion/application.rb:7:in execute' from ..Ruby193/lib/ruby/gems/1.9.1/gems/dandelion-0.3.9/bin/dandelion:7:in<top (required)>' from ..Ruby193/bin/dandelion:23:in load' from ..Ruby193/bin/dandelion:23:in

'

dkouvdis commented 11 years ago

I have the same issue too

scttnlsn commented 11 years ago

Yeah, sorry- not sure what to tell you guys. This is definitely out of the scope of Dandelion. You might consider opening an issue with Grit (if there's another way to execute commands that is more cross platform) or try running this in cygwin.

sukihub commented 11 years ago

Grit incorrectly parses PATH on Windows (splits it using : and tries to find git instead of git.exe). Workaround is to manually set path to Git executable like this: Grit::Git.git_binary = 'C:\wherever_you_have_git\bin\git.exe'

laurencedorman commented 11 years ago

sukihub, would you be so kind as to tell me where I need to add this line to set the path to the Git executable?