Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix encoding issues with Ruby 2.0 (#87). #88

Merged
merged 1 commit into from Jul 6, 2013

Conversation

voxik
Copy link
Contributor

@voxik voxik commented Mar 8, 2013

No description provided.

@deemytch
Copy link

the code:

remote = Net::SSH.start 'site.com', 'remoteuser'
remote.exec 'echo "выполняю задачу" ;' 

causes

incompatible character encodings: ASCII-8BIT and UTF-8
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:284:in `block in write'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:284:in `each'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:284:in `write'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:322:in `block in write_string'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:319:in `each'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:319:in `write_string'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:55:in `block in from'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:47:in `step'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:47:in `from'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/channel.rb:470:in `send_channel_request'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/channel.rb:159:in `exec'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:324:in `block in exec'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/channel.rb:513:in `call'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/channel.rb:513:in `do_open_confirmation'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:539:in `channel_open_confirmation'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:459:in `dispatch_incoming_packets'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:216:in `preprocess'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:200:in `process'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `block in loop'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `loop'
~/.gem/ruby/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `loop'
/workpath/rakefile:80:in `block (2 levels) in '
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'

~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in each' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:inexecute'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in block in invoke_with_call_chain' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:ininvoke_with_call_chain'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in invoke' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:143:ininvoke_task'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in block (2 levels) in top_level' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:ineach'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in block in top_level' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:110:inrun_with_threads'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:95:in top_level' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:73:inblock in run'
~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in standard_exception_handling' ~/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:inrun'

delano added a commit that referenced this pull request Jul 6, 2013
Fix encoding issues with Ruby 2.0 (#87).
@delano delano merged commit f133721 into net-ssh:master Jul 6, 2013
@delano
Copy link
Collaborator

delano commented Jul 6, 2013

@voxik Thanks for the fix.

@deemytch That looks like a separate issue. This is just related to the output while running tests. Feel free to open another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants