trvsdnn / frank

Static Site Non-Framework
http://github.com/blahed/frank
MIT License
413 stars 30 forks source link

Publish: can't upload directories unless :recursive (Net::SCP::Error) #78

Closed Sephi-Chan closed 12 years ago

Sephi-Chan commented 12 years ago

Hi,

When I run frank export I get this error:

Frank is...
 - Exporting templates
 - Publishing to: `jeuweb.org:' via scp
/Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-scp-1.0.4/lib/net/scp/upload.rb:35:in `upload_current_state': can't upload directories unless :recursive (Net::SCP::Error)
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-scp-1.0.4/lib/net/scp.rb:387:in `await_response_state'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-scp-1.0.4/lib/net/scp.rb:356:in `block (3 levels) in start_command'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/channel.rb:311:in `call'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/channel.rb:311:in `process'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:214:in `block in preprocess'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:214:in `each'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:214:in `preprocess'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:197:in `process'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:161:in `block in loop'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:161:in `loop'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/session.rb:161:in `loop'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-ssh-2.5.2/lib/net/ssh/connection/channel.rb:269:in `wait'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-scp-1.0.4/lib/net/scp.rb:279:in `upload!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish/scp.rb:27:in `block in transfer!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish/scp.rb:20:in `block in connection'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/net-scp-1.0.4/lib/net/scp.rb:202:in `start'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish/scp.rb:19:in `connection'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish/scp.rb:25:in `transfer!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish/base.rb:25:in `perform!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish.rb:20:in `block in execute!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish.rb:57:in `rescue_load_error'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/publish.rb:16:in `execute!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/cli.rb:138:in `run!'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/lib/frank/cli.rb:99:in `run'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/lib/ruby/gems/1.9.1/gems/frank-1.0.12/bin/frank:20:in `<top (required)>'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/bin/frank:23:in `load'
    from /Users/romaintribes/.rbenv/versions/1.9.3-p125-perf/bin/frank:23:in `<main>'

How can I deal with it?

Thanks.

trvsdnn commented 12 years ago

Publish is sort of broken. Haven't found a good way to deal with the way Scp uploads folders. I'm planning on re-evaluating this for the next release.

I'd recommend creating a Rakefile in the project with a task that compiles/publishes via rsync or something similar.

Sephi-Chan commented 12 years ago

Thanks for the reply @blahed. I actually ended up using a plain old SCP command. Good luck for the next release ! :)

trvsdnn commented 12 years ago

Yeah, i'm not sure why Net::SCP doesn't work the same, but it doesn't. I'll get it figured out, I want to expand publish to support publishing to s3 also.