From: Robert Klemme Date: 2012-06-08T23:15:46+09:00 Subject: Re: Cannot run a ruby 1.8.7 web-app with ruby 1.9.3 On Fri, Jun 8, 2012 at 3:16 PM, Ruby Ruby wrote: > Robert Klemme wrote in post #1063702: >> On Fri, Jun 8, 2012 at 2:41 PM, Ruby Ruby wrote: >>> hi >>> This is on fedore 17, standard installation. >>> This web-app run flawlessly with ruby 1.8.7, but i cannot make it run >>> with ruby 1.9.3. It is a web-mysql-database application. >>> >>> The following problems: >>> 1) I cannot make run gettext (the app with ruby 1.8.7 runs in various >>> languages) >> >> As far as I can see you only showed how installation of gettext/gci >> failed but no error actually using gettext. >> >>> 2) cgi output is garbled, unusable. >> >> The output looks pretty reasonable on first sight.  What is the >> "garbled" part? >> >> A general remark: it may be that you run into an encoding issue. >> http://blog.grayproductions.net/articles/miscellaneous_m17n_details > Problem is with gettext: I just don't get any Error Message, gettext > just does not do its job, i.e. no conversion at all as if gettext were > not installed. Hm, did you create a simple test case to see whether it works at all? I have zero experience with gettext so I cannot really help much with that. Could be a changed configuration or whatnot. > In the HTML output: did you not see the backslashes in front of the > parameter values? Like: irb(main):001:0> s="This is a \"string\"." => "This is a \"string\"." irb(main):002:0> puts s This is a "string". => nil irb(main):003:0> p s "This is a \"string\"." => "This is a \"string\"." ? That's not a bug, that's the regular output of String#inspect. Are you maybe using the wrong method to print output? Btw, your dispatcher code with [1,2].collect{...} looks pretty inefficient and complex. I'd rather stick all those strings in a Hash and let them be executed from there. cmds = { "start" => lambda {|x_self, dbx, sess, params| ab = ActualBase.new(x_self, dbx, sess) ab.contentx(params) ab }, ... } Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/