scttnlsn / dandelion

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

Crashes when uploading wp-content #67

Closed jacobnollette closed 10 years ago

jacobnollette commented 10 years ago

typed "dandelion deploy" dandelion goes through many files and quits in the same location. not sure why, checked the file encoding, no git repository, and the same file uploads if moved to another location.

Uploading file: wp-content/index.php
/Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/git.rb:83:in `show': undefined method `data' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/deployment.rb:154:in `block in deploy'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/deployment.rb:150:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/deployment.rb:150:in `deploy'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/command/deploy.rb:50:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:38:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/command.rb:92:in `initialize'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:36:in `new'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:36:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:7:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/bin/dandelion:7:in `<top (required)>'
    from /usr/bin/dandelion:23:in `load'
    from /usr/bin/dandelion:23:in `<main>'
jacobnollette commented 10 years ago

Can i provide more information that would make this issue more easily fixable, or answerable? I received this error not long after a fresh mavericks wipe/install.

scttnlsn commented 10 years ago

@jnollette That would be helpful. Are you using Git submodules? Were you not encountering this problem w/ the same repository prior to installing Mavericks?

jacobnollette commented 10 years ago

No submodules or additional git repositories in the project. I have used dandelion on a past machine, but not with a new mavericks machine. Maybe my issue has to do with grit. [Below] I tested a deploy with another wordpress site, and got a new issue. My above mentioned first issue remains the same.

Connecting to sftp://****/test
Remote revision:      ---
Deploying revision:   c066b63bb766d30ff23edb5b6c82024a79190cbe

/Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/internal/pack.rb:135:in `block (2 levels) in init_pack': pack /Users/****/Sites/****.dev/.git/objects/pack/pack-da0921f3a8d18f64698aa3081ee039eba90b4b0f.pack has discontinuous index 1 

(Grit::GitRuby::Internal::PackFormatError)
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/internal/pack.rb:132:in `times'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/internal/pack.rb:132:in `block in init_pack'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/internal/pack.rb:73:in `with_idx'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/internal/pack.rb:130:in `init_pack'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/internal/pack.rb:46:in `initialize'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:763:in `new'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:763:in `block (2 levels) in load_packs'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:761:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:761:in `block in load_packs'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:760:in `open'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:760:in `load_packs'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:743:in `initpacks'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:89:in `get_raw_object_by_sha1'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:105:in `get_object_by_sha1'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby/repository.rb:155:in `cat_file'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:26:in `block in cat_file'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:211:in `block in try_run'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:210:in `try_run'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:26:in `cat_file'
    from /Library/Ruby/Gems/2.0.0/gems/grit-2.5.0/lib/grit/blob.rb:43:in `data'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/git.rb:83:in `show'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/deployment.rb:154:in `block in deploy'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/deployment.rb:150:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/deployment.rb:150:in `deploy'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/command/deploy.rb:50:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:38:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/command.rb:92:in `initialize'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:36:in `new'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:36:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/lib/dandelion/application.rb:7:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.3.14/bin/dandelion:7:in `<top (required)>'
    from /usr/bin/dandelion:23:in `load'
    from /usr/bin/dandelion:23:in `<main>'
jacobnollette commented 10 years ago

Tested and found the issue to also occur on another mavericks machine. This machine also had a recent wipe.

scttnlsn commented 10 years ago

@jnollette I wonder if the issue is w/ the Ruby version you're using? Were you previously using Ruby 1.9? I'm working on a new version of Dandelion that does not depend on Grit (it is no longer maintained) and instead uses https://github.com/libgit2/rugged.

scttnlsn commented 10 years ago

I released a new version that does not depend on Grit:

gem install dandelion --version 0.4.0.beta1

Could you test it out and see if it fixes this problem?

jacobnollette commented 10 years ago

@scttnlsn thanks for the update! I updated dandelion and got a similar error. Should I look into upgrading my ruby?

When wiping my computer recently, i installed os x mountain lion, than upgraded to mavericks.

ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
/Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/adapter/sftp.rb:99:in `mkdir_p': undefined local variable or method `sftp' for #<Dandelion::Adapter::SFTP:0x007f81c209a268> (NameError)
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/adapter/sftp.rb:38:in `rescue in block in write'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/adapter/sftp.rb:34:in `block in write'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/utils.rb:9:in `temp'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/adapter/sftp.rb:33:in `write'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/deployer.rb:37:in `deploy_change!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/deployer.rb:13:in `block in deploy_changeset!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/changeset.rb:27:in `block in each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/diff.rb:58:in `block in each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/diff.rb:57:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/diff.rb:57:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/changeset.rb:20:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/deployer.rb:9:in `deploy_changeset!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/command/deploy.rb:55:in `deploy_changeset!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/command/deploy.rb:30:in `execute!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/lib/dandelion/cli.rb:66:in `execute!'
    from /Library/Ruby/Gems/2.0.0/gems/dandelion-0.4.0.beta1/bin/dandelion:8:in `<top (required)>'
    from /usr/bin/dandelion:23:in `load'
    from /usr/bin/dandelion:23:in `<main>'
scttnlsn commented 10 years ago

@jnollette Ahh, that looks like a silly mistake on my part. I'll publish a new version and let you know.

scttnlsn commented 10 years ago

gem install dandelion --version 0.4.0.beta2

jacobnollette commented 10 years ago

@scttnlsn The new version is working for me. Thanks!

scttnlsn commented 10 years ago

Good news! Thanks for being patient here. Please report any bugs you encounter while using the beta version.