M
Mark Watson
When I use Ruby 1.8.6 my Rails app works fine. Under Ruby 1.9.1 in
development mode Webrick is trying to "split" binary data and throws
an error:
#<ArgumentError: invalid byte sequence in UTF-8>
["/Users/markw/bin/ruby19/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/
webrick_server.rb:136:in `split'", "/Users/markw/bin/ruby19/lib/ruby/
gems/1.9.1/gems/rails-2.2.2/lib/webrick_server.rb:136:in
`extract_header_and_body'", "/Users/markw/bin/ruby19/lib/ruby/gems/
1.9.1/gems/rails-2.2.2/lib/webrick_server.rb:109:in
`handle_dispatch'", "/Users/markw/bin/ruby19/lib/ruby/gems/1.9.1/gems/
rails-2.2.2/lib/webrick_server.rb:74:in `service'", "/Users/markw/bin/
ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'", "/Users/
markw/bin/ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'", "/
Users/markw/bin/ruby19/lib/ruby/1.9.1/webrick/server.rb:183:in `block
in start_thread'"]
As much as possible I am trying convert all my Ruby code and Rails
apps to Ruby 1.9.x and this is one of the last problems that I am
having problems working around.
I have tried several combinations of send_file calls like:
send_file(filename, :filename => asset.filename, :type => :jpeg)
and none work - unless I am sending a plain text file.
This is obviously a unicode problem.
Thanks,
Mark
development mode Webrick is trying to "split" binary data and throws
an error:
#<ArgumentError: invalid byte sequence in UTF-8>
["/Users/markw/bin/ruby19/lib/ruby/gems/1.9.1/gems/rails-2.2.2/lib/
webrick_server.rb:136:in `split'", "/Users/markw/bin/ruby19/lib/ruby/
gems/1.9.1/gems/rails-2.2.2/lib/webrick_server.rb:136:in
`extract_header_and_body'", "/Users/markw/bin/ruby19/lib/ruby/gems/
1.9.1/gems/rails-2.2.2/lib/webrick_server.rb:109:in
`handle_dispatch'", "/Users/markw/bin/ruby19/lib/ruby/gems/1.9.1/gems/
rails-2.2.2/lib/webrick_server.rb:74:in `service'", "/Users/markw/bin/
ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'", "/Users/
markw/bin/ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'", "/
Users/markw/bin/ruby19/lib/ruby/1.9.1/webrick/server.rb:183:in `block
in start_thread'"]
As much as possible I am trying convert all my Ruby code and Rails
apps to Ruby 1.9.x and this is one of the last problems that I am
having problems working around.
I have tried several combinations of send_file calls like:
send_file(filename, :filename => asset.filename, :type => :jpeg)
and none work - unless I am sending a plain text file.
This is obviously a unicode problem.
Thanks,
Mark