scttnlsn / dandelion

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

...lib/dandelion/git.rb:67:in `show': undefined method `data' for nil:NilClass (NoMethodError) #25

Closed jwmann closed 10 years ago

jwmann commented 11 years ago

I'm not sure at what point in the uploading process this happened but it did go through a lot of files before this error happened.

Any ideas?

/usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/git.rb:67:in `show': undefined method `data' for nil:NilClass (NoMethodError)
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:140:in `block in deploy'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:135:in `each'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/deployment.rb:135:in `deploy'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/command/deploy.rb:50:in `execute'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/application.rb:38:in `block in execute'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/command.rb:92:in `initialize'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/application.rb:36:in `new'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/application.rb:36:in `execute'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/lib/dandelion/application.rb:7:in `execute'
    from /usr/local/Cellar/gems/gems/dandelion-0.3.9/bin/dandelion:7:in `<top (required)>'
    from /usr/local/Cellar/gems/bin/dandelion:23:in `load'
    from /usr/local/Cellar/gems/bin/dandelion:23:in `<main>'
scttnlsn commented 11 years ago

Do you know which file is being deployed when you get this error? See #12.

jwmann commented 11 years ago

I think it must be the same issue as your reference.

These were the last two lines before it flagged the error.

Uploading file: wp-content/themes/habitat/assets/sponsors/Home Depot lower res JPG.jpg
Uploading file: "wp-content/themes/habitat/assets/sponsors/Home De\314\201po\314\202t_Canada_Foundation.jpg"
ejdanderson commented 11 years ago

I'm having a similar issue with a submodule using dandelion 0.3.9

/Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/git.rb:67:in `show': undefined method `data' for #<Grit::Submodule "99c0a992d9d20b8de297d967f0c19c8373ef9a7a"> (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/deployment.rb:140:in `deploy'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/deployment.rb:135:in `each'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/deployment.rb:135:in `deploy'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/command/deploy.rb:50:in `execute'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/application.rb:38:in `execute'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/command.rb:92:in `initialize'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/application.rb:36:in `new'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/application.rb:36:in `execute'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/../lib/dandelion/application.rb:7:in `execute'
from /Library/Ruby/Gems/1.8/gems/dandelion-0.3.9/bin/dandelion:7
from /usr/bin/dandelion:19:in `load'
from /usr/bin/dandelion:19

edit: Adding full backtrace

scttnlsn commented 11 years ago

@kidfiction This looks like another issue. I don't think submodules have previously been addressed.

schikulski commented 11 years ago

I had the same issue. Found out that I had another git repository inside my main repository(a js plugin). Worked after I deleted the git files for the second repository.

7twelve commented 11 years ago

44 should address this, albeit by a heavy-handed ignore of the submodules - but should at least allow you to deploy without error, just need to manually deploy any submodules until a way to handle those has been devised.

collin35 commented 10 years ago

Having probably similiar issue. Cannot find the way or workaround to upload via dandelion. Any suggestions please ?

Skipping file: assets/Prohlasenirodicu12m.pdf
Skipping file: assets/Soustredeni_zak_kat_12.pdf
/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 `'
    from /usr/bin/dandelion:23:in `load'
    from /usr/bin/dandelion:23:in `
'
schikulski commented 10 years ago

@collin35 if you have a second git repository inside your main git repository(the one you're deploying), then that might cause the error. Dandelion doesn't seem to work well with submodules, see issue #37.

jinmatt commented 10 years ago

It would be helpful if you guys can solve this problem instead of closing this issue. What if I need to deploy files with spacial characters or submodules?

Btw this is the console log errors I'm getting:

/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>'
jeffwhitfield commented 10 years ago

Same issue here. I'm using Composer to keep addons up to date for my web application. It pulls them in as git repos so, even without submodules, Dandelion can't deploy the directories without an error. Basically means I'm SOL when it comes to using Dandelion. Off to find another solution! :(

scttnlsn commented 10 years ago

@jeffwhitfield Yeah, there's no support for submodules right now. There's a workaround presented in https://github.com/scttnlsn/dandelion/issues/37 but ideally I'd like to support this use case. I'll leave the other issue open in case I have time to work on this feature or someone else wants to submit a pull request.

ronilaukkarinen commented 10 years ago

I have the same issue. No idea what causes it.

Skipping file: wp-content/uploads/2013/09/Clown-Fish.jpg /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>'

nitishdhar commented 10 years ago

I was also getting the same issue. Looks like its related to either issues in file name, file type or file size. I was uploading an assets folder which had a lot of files. I removed that folder & deploy worked properly.

scttnlsn commented 10 years ago

@nitishdhar What version of Dandelion are you using?

nitishdhar commented 10 years ago

@scttnlsn I updated to the latest 0.4.3

scttnlsn commented 10 years ago

@nitishdhar Could you post the full stack trace you're getting with 0.4.3?