Why is my Sproutcore development server removing connections with "invalid byte sequence in US-ASCII"?

Here's the stack: Sproutcore 1.0.1046. Ruby 1.9.1, in RVM. Thin 1.2.7. Thor 0.13.8. Stand 1.2.1. Eventmachine 0.12.10. Erubis 2.6.6.

When I run sc-serverin any application, my first request to this server produces this in the console log:

ArgumentError: invalid byte sequence in US-ASCII

... then this stack trace . (I have listed the gems that appear in the stack trace above, but there is a complete list of gemset in the same form as the stack trace.)

Examining the error message indicates that this is a common problem with Ruby 1.9, but the stack trace suggests that the problem is in one of the stones somewhere.

I have:

  • Upgraded my OS (Mac OS X 10.5 to 10.6) to get the latest version of gccApple.
  • Reinstalled RVM.
  • Reinstalled Ruby.
  • Reinstalled all matching gems.

And yet I still have this problem in one system, but not in another. (NB there are several developers working on this code, and I am the only one who sees this problem. I am 99% sure that this is not our code.) I assume that I say that I cleaned and rebuilt a lot of gems to try to isolate or remove this failure, and yet I still have not got rid of it.

Where should I look next?

+4
source share
5 answers

bash, US-ASCII, , sc- ... , , UTF-8 .

+5

, Encoding.default_external

+2

Encoding.default_external. , , . Rails 2.3.9 before_filter application_controller.rb, :

def set_encoding
  Encoding.default_external = 'UTF-8'
end
+1

RSS-, Rails 2.3.8 Ruby 1.9.2. application_controller.rb before_filter, . : "RAILS_ROOT/config/initializers/string_encodings.rb":

Encoding.default_external = 'UTF-8'

, .

+1

ArgumentError Capistrano, envolves ruby ​​net-ssh (ruby 1.9.2p290, net-ssh 2.3.0). , , : , " " ..

Finally, I found the ASCII character in the comment line (!) In my ASCII encoded file ~ / .ssh / config. BINGO!

+1
source

All Articles