Code Monkey home page Code Monkey logo

Comments (10)

janreges avatar janreges commented on May 26, 2024 1

Btw, also this in begin of Gemfile doesn't help ;-(

if RUBY_VERSION =~ /1.9/
    Encoding.default_external = Encoding::UTF_8
    Encoding.default_internal = Encoding::UTF_8
end

from airbrussh.

mattbrictson avatar mattbrictson commented on May 26, 2024

Thanks for the bug report! I'll investigate today.

from airbrussh.

janreges avatar janreges commented on May 26, 2024

Thank you, Matt.

from airbrussh.

mattbrictson avatar mattbrictson commented on May 26, 2024

@janreges Can you try the latest commit on master (e5236dc) to see if it fixes the problem?

In your Gemfile:

gem "airbrussh", :github => "mattbrictson/airbrussh", :ref => "e5236dc", :require => false

from airbrussh.

janreges avatar janreges commented on May 26, 2024

@mattbrictson - i tried it, but it doesn't help :-(

After Gemfile update, i run bundle and bundle update. Gemfile.lock was updated and it contains:

GIT
  remote: git://github.com/mattbrictson/airbrussh.git
  revision: e5236dc4d4b7d45c8020536a105d834b3be45f3c
  ref: e5236dc
  specs:
    airbrussh (0.3.0)
      sshkit (>= 1.6.1, != 1.7.0)

and airbrussh! in section DEPENDENCIES.

Current trace is the same:

cap aborted!
ArgumentError: invalid byte sequence in US-ASCII
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/trace_output.rb:16:in `block in trace_on'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/trace_output.rb:14:in `map'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/trace_output.rb:14:in `trace_on'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:376:in `trace'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:222:in `display_exception_message_details'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:209:in `display_exception_details'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:198:in `display_error_message'
/usr/local/lib64/ruby/gems/1.9.1/gems/capistrano-3.4.0/lib/capistrano/application.rb:73:in `display_error_message'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:185:in `rescue in standard_exception_handling'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/usr/local/lib64/ruby/gems/1.9.1/gems/capistrano-3.4.0/lib/capistrano/application.rb:15:in `run'
/usr/local/lib64/ruby/gems/1.9.1/gems/capistrano-3.4.0/bin/cap:3:in `<top (required)>'
/usr/local/bin/cap:23:in `load'
/usr/local/bin/cap:23:in `<main>'

from airbrussh.

mattbrictson avatar mattbrictson commented on May 26, 2024

@janreges The stack trace you posted is an error in Rake itself, which is making troubleshooting difficult. Rake seems to have caught an exception, but is encountering its own error when attempting to handle that exception. As a result, the original exception is getting lost.

Is there any way you could use a debugger, add some puts statements, or otherwise modify lib/capistrano/application.rb:73 so that we can see what the original exception is before it is handed off to Rake's display_error_message?

from airbrussh.

janreges avatar janreges commented on May 26, 2024

@mattbrictson: i'm not a ruby/rails programmer, but this was simple :)

I added puts ex.message into display_error_message in application.rb.

In deploy, an exception below has been thrown. After that, i looked into formatter.rb and i saw a problem. There was no # encoding: UTF-8 in the beginning, as you added in commit e5236dc.

When i added encoding manually, everything is working fine.

So, it's my fail. Probably still something else was needed, except Gemfile update and bundle + bundle update?

/usr/local/lib64/ruby/gems/1.9.1/gems/airbrussh-0.3.0/lib/airbrussh/formatter.rb:207: invalid multibyte char (US-ASCII)
/usr/local/lib64/ruby/gems/1.9.1/gems/airbrussh-0.3.0/lib/airbrussh/formatter.rb:207: invalid multibyte char (US-ASCII)
/usr/local/lib64/ruby/gems/1.9.1/gems/airbrussh-0.3.0/lib/airbrussh/formatter.rb:207: syntax error, unexpected $end, expecting ')'
        red("✘ #{number} #{user_at_host} (...
               ^
cap aborted!
invalid byte sequence in US-ASCII
cap aborted!
ArgumentError: invalid byte sequence in US-ASCII

from airbrussh.

mattbrictson avatar mattbrictson commented on May 26, 2024

@janreges Great!

I think you did everything right, except maybe you ran just cap instead of bundle exec cap? The latter ensures that the version in the Gemfile is used when the airbrussh gem is loaded.

from airbrussh.

mattbrictson avatar mattbrictson commented on May 26, 2024

Fixed in e5236dc.

from airbrussh.

janreges avatar janreges commented on May 26, 2024

@mattbrictson Your guess was right :-) I ran "cap" instead of "bundle exec cap".

Thank you for your support!

from airbrussh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.