title: rake tasks fail with invalid byte sequence in US-ASCII
body: <p>After upgrading to ruby 1.9.3 one of my apps is working fine but the second one I am trying to convert fails at the "assets:precompile" stage when I try to deploy with capistrano.
  Here is the stacktrace:</p>
  
  <pre><code>    rake aborted!
      rake aborted!
      invalid byte sequence in US-ASCII
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/trace_output.rb:16:in `block in trace_on'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `map'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `trace_on'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:328:in `trace'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:183:in `display_error_message'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:169:in `rescue in standard_exception_handling'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:159:in `standard_exception_handling'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@rails3211/bin/ruby_noexec_wrapper:14:in `eval'
      /Users/george/.rvm/gems/ruby-1.9.3-p392@rails3211/bin/ruby_noexec_wrapper:14:in `&lt;main&gt;'    
  </code></pre>
  
  <p>I have read numerous posts and tried several suggestions but to no avail.
  I tried adding the following to the top of my gemfile:</p>
  
  <pre><code>if RUBY_VERSION =~ /1.9/
    Encoding.default_external = Encoding::UTF_8
    Encoding.default_internal = Encoding::UTF_8
  end
  </code></pre>
  
  <p>But it made no difference.</p>
  
  <p>I checked LANG and LC_ALL environment variables as follows</p>
  
  <pre><code>$ echo $LC_ALL
  en_NZ.UTF-8
  
  $ echo $LANG
  en_NZ.UTF-8
  </code></pre>
  
  <p>I'm afraid I dont really understand the message at all and I dont know how to identify the file that has the problem.</p>
  
  <p>I cant get any rake task to run - it gives the same error.</p>
  
  <p>Note that I can run the application perfectly fine in development mode.</p>