Hi People, Im running the seed.rd for the countries from here: https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads the author states that the file is UTF. When I execute the import I recieve the error: invalid multibyte char (UTF-8)'' (from instructions here: http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 ) I tried adding this to the top of the file: # encoding: utf-8 but still no luck. I tried the instructions here: https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J Still the same error occours. Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: 3.1.3 running on windows. Any ideas what I have wrong? Thanks, Maxus -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zPPEATNOueIJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi All, I rebuilt my enviroment on linux, still the same issue occours. Any one have any idea whats going on? Thanks! Maxus On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote:> Hi People, > > Im running the seed.rd for the countries from here: > https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads the > author states that the file is UTF. > > When I execute the import I recieve the error: invalid multibyte char > (UTF-8)'' (from instructions here: > http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 > ) > > I tried adding this to the top of the file: # encoding: utf-8 but still no > luck. > > I tried the instructions here: > https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J > > Still the same error occours. > > Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: > 3.1.3 running on windows. > > Any ideas what I have wrong? > Thanks, > Maxus > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/dRFMyRGVei8J. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
El lunes 12 de marzo de 2012 11:38:24 UTC+1, Maxus escribió:> > Hi All, > > I rebuilt my enviroment on linux, still the same issue occours. Any one > have any idea whats going on? > > Thanks! > Maxus > > > > On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote: > >> Hi People, >> >> Im running the seed.rd for the countries from here: httpUnfortunately I >> can''t explain a good reason for why this works like it doesUnfortunately I >> can''t explain a good reason for why this works like it >> doess://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads<https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads> the >> author states that the file is UTF. >> >> When I execute the import I recieve the error: invalid multibyte char >> (UTF-8)'' (from instructions here: >> http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 >> ) >> >> I tried adding this to the top of the file: # encoding: utf-8 but still >> no luck. >> >> I tried the instructions here: >> https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J >> >> Still the same error occours. >> >> Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: >> 3.1.3 running on windows. >> >> Any ideas what I have wrong? >> Thanks, >> Maxus >> >> >Your problem will probably go away if you write the following comment at the top of the .rb file: # encoding: utf-8 Regards. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/W4Ta9JYLXesJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Juan, I have tried that, still recieve the same error. Also noticed running the seed on heroku also throws the same error. Any other suggestions? Thanks! Maxus On Monday, March 12, 2012 6:55:32 PM UTC+8, Juan Pablo Avello wrote:> > > El lunes 12 de marzo de 2012 11:38:24 UTC+1, Maxus escribió: >> >> Hi All, >> >> I rebuilt my enviroment on linux, still the same issue occours. Any one >> have any idea whats going on? >> >> Thanks! >> Maxus >> >> >> >> On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote: >> >>> Hi People, >>> >>> Im running the seed.rd for the countries from here: httpUnfortunately I >>> can''t explain a good reason for why this works like it doesUnfortunately I >>> can''t explain a good reason for why this works like it >>> doess://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads<https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads> the >>> author states that the file is UTF. >>> >>> When I execute the import I recieve the error: invalid multibyte char >>> (UTF-8)'' (from instructions here: >>> http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 >>> ) >>> >>> I tried adding this to the top of the file: # encoding: utf-8 but still >>> no luck. >>> >>> I tried the instructions here: >>> https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J >>> >>> Still the same error occours. >>> >>> Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: >>> 3.1.3 running on windows. >>> >>> Any ideas what I have wrong? >>> Thanks, >>> Maxus >>> >>> >> > Your problem will probably go away if you write the following comment at > the top of the .rb file: > > # encoding: utf-8 > > Regards. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/EvKS3-ci_wcJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hi, <br> <br> Try to reconvert the file with "iconv -f UTF-8" and add "# encoding: utf-8" to the first line.... <br> <br> In case isn''t working I will suggest to review the encoding of the database and maybe to force it with "encoding: UTF8"<br> <br> Regards, <br> <br> El 12/03/2012 12:25, Maxus escribió: <blockquote cite="mid:20095148.456.1331551536253.JavaMail.geo-discussion-forums@pbnt10" type="cite"> <div> </div> <div>Hi Juan,</div> <div> </div> <div>I have tried that, still recieve the same error. Also noticed running the seed on heroku also throws the same error.</div> <div> </div> <div>Any other suggestions?</div> <div> </div> <div>Thanks!</div> <div>Maxus</div> <div> </div> <div><br> On Monday, March 12, 2012 6:55:32 PM UTC+8, Juan Pablo Avello wrote:</div> <blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"><br> <br> El lunes 12 de marzo de 2012 11:38:24 UTC+1, Maxus escribió: <blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"> <div>Hi All,</div> <div> </div> <div>I rebuilt my enviroment on linux, still the same issue occours. Any one have any idea whats going on?</div> <div> </div> <div>Thanks!</div> <div>Maxus</div> <div> </div> <div> </div> <div><br> On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote:</div> <blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"> <div>Hi People,</div> <div> </div> <div>Im running the seed.rd for the countries from here: <a moz-do-not-send="true" href="https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads" target="_blank">httpUnfortunately I can''t explain a good reason for why this works like it doesUnfortunately I can''t explain a good reason for why this works like it doess://github.com/wdblair/<wbr>Rails-Seed-All-Countries-and-<wbr>All-States/downloads</a> the author states that the file is UTF.</div> <div> </div> <div>When I execute the import I recieve the error: invalid multibyte char (UTF-8)'' (from instructions here: <a moz-do-not-send="true" href="http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9" target="_blank">http://stackoverflow.com/<wbr>questions/1739836/invalid-<wbr>multibyte-char-us-ascii-with-<wbr>rails-and-ruby-1-9</a>)</div> <div> </div> <div>I tried adding this to the top of the file: # encoding: utf-8 but still no luck.</div> <div> </div> <div>I tried the instructions here: <a moz-do-not-send="true" href="https://groups.google.com/forum/?fromgroups#%21searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J" target="_blank">https://groups.google.com/<wbr>forum/?fromgroups#!searchin/<wbr>rubyonrails-talk/invalid$<wbr>20multibyte$20char/<wbr>rubyonrails-talk/KKXeimNmjV4/<wbr>B5qfG9trqW8J</a></div> <div> </div> <div>Still the same error occours.</div> <div> </div> <div>Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: 3.1.3 running on windows.</div> <div> </div> <div>Any ideas what I have wrong?<br> </div> <div>Thanks,</div> <div>Maxus</div> <div> </div> </blockquote> </blockquote> <div><br> </div> <div>Your problem will probably go away if you write the following comment at the top of the .rb file:</div> <div><br> </div> <div># encoding: utf-8</div> <div><br> </div> <div>Regards.</div> </blockquote> -- <br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.<br> To view this discussion on the web visit <a moz-do-not-send="true" href="https://groups.google.com/d/msg/rubyonrails-talk/-/EvKS3-ci_wcJ">https://groups.google.com/d/msg/rubyonrails-talk/-/EvKS3-ci_wcJ</a>.<br> To post to this group, send email to <a class="moz-txt-link-abbreviated" href="mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org">rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org</a>.<br> To unsubscribe from this group, send email to <a class="moz-txt-link-abbreviated" href="mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org">rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org</a>.<br> For more options, visit this group at <a class="moz-txt-link-freetext" href="http://groups.google.com/group/rubyonrails-talk?hl=en">http://groups.google.com/group/rubyonrails-talk?hl=en</a>.<br> </blockquote> <br> <pre class="moz-signature" cols="72">-- Miquel Cubel Escarré <a class="moz-txt-link-freetext" href="http://railsdynamics.blogspot.com">http://railsdynamics.blogspot.com</a> +34 699 73 22 46 <a class="moz-txt-link-abbreviated" href="mailto:mcubel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">mcubel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a> </pre> </body> </html> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.<br /> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.<br />
Hi All, I tried everything and was going mad. I discovered redownloading the file and replacing my existing one fixed it after putting the utf header in. My guess is editing the file on windows somehow stuffed up the encoding (surprise surprise!). Thank you everyone for their help! -M On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote:> Hi People, > > Im running the seed.rd for the countries from here: > https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads the > author states that the file is UTF. > > When I execute the import I recieve the error: invalid multibyte char > (UTF-8)'' (from instructions here: > http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 > ) > > I tried adding this to the top of the file: # encoding: utf-8 but still no > luck. > > I tried the instructions here: > https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J > > Still the same error occours. > > Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: > 3.1.3 running on windows. > > Any ideas what I have wrong? > Thanks, > Maxus > >On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote:> > Hi People, > > Im running the seed.rd for the countries from here: > https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads the > author states that the file is UTF. > > When I execute the import I recieve the error: invalid multibyte char > (UTF-8)'' (from instructions here: > http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 > ) > > I tried adding this to the top of the file: # encoding: utf-8 but still no > luck. > > I tried the instructions here: > https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J > > Still the same error occours. > > Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: > 3.1.3 running on windows. > > Any ideas what I have wrong? > Thanks, > Maxus > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/O0AomlaGsXwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.