search for: undefinedconversionerror

Displaying 7 results from an estimated 7 matches for "undefinedconversionerror".

2010 Nov 01
1
Encoding::UndefinedConversionError on a simple file upload (rvm, MRI-1.9.2-p0, rails 3.0.1, apache+passenger)
Hello everyone. I am having the encoding issue on a simple file upload action: Encoding::UndefinedConversionError in MainController#upload "\xC4" from ASCII-8BIT to UTF-8 The action looks like this: def upload @uploaded_io = params[:upload] File.open(Rails.root.join(''public'', ''images'', @uploaded_io.original_filename), ''w'') do |file|...
2012 Oct 09
0
[Win7 x64] Encoding::UndefinedConversionError after installing when using gem and rails
Hello, after installing the RailsInstaller i got the following error: C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb:57:in `exist?'': "\x81" to UTF-8 in conversion from Windows-1252 to UTF-8 (Encoding::UndefinedConversionError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb:57:in `default_path'' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb:63:in `path='' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1....
2012 Jan 27
2
dealing with Encoding::UndefinedConversionError: "\xA2" from ASCII-8BIT to UTF-8
...ctions that this neophyte can follow? (I gather I''m supposed to fork and add the current master version from github to my config, but I need simple little steps for muddy little feet.) Thanks... I''m running Rails 3.2, Mechanize 2.1. Mechanize is failing with Encoding::UndefinedConversionError: "\xA2" from ASCII-8BIT to UTF-8 with this (partial) stack trace: from /app/vendor/bundle/ruby/1.9.1/gems/mechanize-2.1/lib/mechanize/http/agent.rb:807:in `block in response_read'' from /usr/local/lib/ruby/1.9.1/net/protocol.rb:387:in `call_block'' from /usr/local/lib/ru...
2011 Sep 04
2
Encoding error
I create scaffold and trying to save text with cirllic symbols i recieved: Encoding::UndefinedConversionError: U+043F from UTF-8 to US-ASCII: my database charset is utf8 in database.yml encoding:utf8 why rails is still trying to convert text to ascii? what should i do to save my data in utf8? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou...
2011 Jan 23
1
Force UTF-8 encoding
I''m writing an upload script for contact management, but having encoding issues: #=> Encoding::UndefinedConversionError: "\xFA" from ASCII-8BIT to UTF-8 I will not always know the encoding supplied, and this is the result of `some_string.encode("UTF-8")` I have also tried .force_encoding("UTF-8") to no avail. For now I''m simply trying to bypass invalid characters by replac...
2011 Jan 17
6
Can't install mongrel with ruby 1.9.2p136
...install mongrel" on Windows 7 x64 gem install mongrel Successfully installed mongrel-1.1.5-x86-mingw32 1 gem installed Installing ri documentation for mongrel-1.2.0.pre2-x86-mingw32... Installing EDoc documentation for mongrel-1.2.0.pre2-x86-mingw32... ERROR: While executing gem... (Encoding::UndefinedConversionError) U+2019 from UTF-8 to CP850 Does anyone know what''s happening and how to solve it? Thanks in advance! --------------------------------------------------- Douglas Fonseca Engenharia da Computação 2010 Universidade Estadual de Campinas -- You received this message because you are sub...
2011 Jan 13
0
rails 3 Mail encoding issue
...ng: base64>, <Content-Disposition: attachment; filename=landscape.mp4>> got what I need, but trying to store this attachment in a temp file , I get an encoding error : File.open(filepath,File::CREAT|File::TRUNC|File::WRONLY,0644) { | f| f.write(attachment.body) } Encoding::UndefinedConversionError Exception: "\x80" from ASCII-8BIT to UTF-8 did I miss anything before writing the file ? or is it a known Ruby bug ? being an .mp4 attachment, it should be a binary file.. it comes as an UTF-8 ( Base64) ? , right... how should I write it as a binary too ? tfyh -- You received this messa...