Travis Reeder
2009-May-28 23:54 UTC
Getting an exception in actionpack: "invalid byte sequence in US-ASCII" with ruby 1.9
After upgrading to Ruby 1.9 and Passenger, we started getting this while uploading a binary data file through a form. I''m not sure if it''s ruby 1.9 or passenger, but either way, any help would be greatly appreciated. /!\ FAILSAFE /!\ 2009-05-28 00:39:30 +0000 Status: 500 Internal Server Error invalid byte sequence in US-ASCII d /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:320:in `=~'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:320:in `block in parse_multipart'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:315:in `loop'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/utils.rb:315:in `parse_multipart'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/request.rb:125:in `POST'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/methodoverride.rb:15:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/params_parser.rb:15:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/rewindable_input.rb:25:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/session/cookie_store.rb:93:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/failsafe.rb:11:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/lock.rb:11:in `block in call'' <internal:prelude>:8:in `synchronize'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/vendor/rack-1.0/rack/lock.rb:11:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ action_controller/dispatcher.rb:106:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/rack/request_handler.rb:81:in `process_request'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/abstract_request_handler.rb:203:in `main_loop'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/railz/application_spawner.rb:298:in `block in handle_spawn_application'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/utils.rb:181:in `safe_fork'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/railz/application_spawner.rb:296:in `handle_spawn_application'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/abstract_server.rb:337:in `main_loop'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/abstract_server.rb:187:in `start_synchronously'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/abstract_server.rb:154:in `start'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/railz/application_spawner.rb:192:in `start'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/spawn_manager.rb:257:in `block (2 levels) in spawn_rails_application'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/spawn_manager.rb:251:in `block in spawn_rails_application'' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ phusion_passenger/abstract_server_collection.rb:80:in `block in synchronize'' <internal:prelude>:8:in `synchronize''
Rick
2009-Jun-08 13:16 UTC
Re: Getting an exception in actionpack: "invalid byte sequence in US-ASCII" with ruby 1.9
I ran into a similar problem a while back. Here''s an email thread that might help: http://groups.google.com/group/rack-devel/browse_thread/thread/76065d11ea3d55c2/13c8e39c788186a8?hl=en&lnk=gst&q=rick#13c8e39c788186a8 Rick On May 28, 7:54 pm, Travis Reeder <tree...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> After upgrading to Ruby 1.9 and Passenger, we started getting this > while uploading a binary data file through a form. I''m not sure if > it''s ruby 1.9 or passenger, but either way, any help would be greatly > appreciated. > > /!\ FAILSAFE /!\ 2009-05-28 00:39:30 +0000 > Status:500InternalServer Error > invalid byte sequence in US-ASCII > d /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/utils.rb:320:in `=~'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/utils.rb:320:in `block in > parse_multipart'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/utils.rb:315:in `loop'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/utils.rb:315:in > `parse_multipart'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/request.rb:125:in `POST'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/methodoverride.rb:15:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/params_parser.rb:15:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/rewindable_input.rb:25:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/session/cookie_store.rb:93:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/failsafe.rb:11:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/lock.rb:11:in `block in call'' > <internal:prelude>:8:in `synchronize'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/vendor/rack-1.0/rack/lock.rb:11:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/ > action_controller/dispatcher.rb:106:in `call'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/rack/request_handler.rb:81:in `process_request'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/abstract_request_handler.rb:203:in `main_loop'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/railz/application_spawner.rb:340:in > `start_request_handler'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/railz/application_spawner.rb:298:in `block in > handle_spawn_application'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/utils.rb:181:in `safe_fork'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/railz/application_spawner.rb:296:in > `handle_spawn_application'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/abstract_server.rb:337:in `main_loop'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/abstract_server.rb:187:in `start_synchronously'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/abstract_server.rb:154:in `start'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/railz/application_spawner.rb:192:in `start'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/spawn_manager.rb:257:in `block (2 levels) in > spawn_rails_application'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/spawn_manager.rb:251:in `block in > spawn_rails_application'' > /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.2/lib/ > phusion_passenger/abstract_server_collection.rb:80:in `block in > synchronize'' > <internal:prelude>:8:in `synchronize''