[#396148] Facebook Group — Moses Aronov <mosesaro@...>

There is a facebook group that was recently created so we could all communicate with other fellow developers

13 messages 2012/06/05
[#396178] Re: Facebook Group — Chad Perrin <code@...> 2012/06/06

On Wed, Jun 06, 2012 at 01:55:48AM +0900, Moses Aronov wrote:

[#396186] Inexplicable Argument Error — Doug Jolley <lists@...>

I am encountering a very strange argument error. I simplified my code

12 messages 2012/06/06

[#396229] Thread#kill is not rescued by "rescue Exception" — Iñaki Baz Castillo <ibc@...>

Hi, let me show this easy code:

13 messages 2012/06/07

[#396333] Is "a,b=c,d" atomic? or do I need a Mutex? — Iñaki Baz Castillo <ibc@...>

Hi, I have two methods that could be called by different threads and

10 messages 2012/06/10

[#396357] ffi - Popping image on top of the screen — "Damián M. González" <lists@...>

Ey guys, how are you? I`m developing an application in Ruby, using

12 messages 2012/06/11

[#396373] Why should I learn ruby? — Kasper Steensig <lists@...>

I have wondered whether I should learn ruby or python hence they are

16 messages 2012/06/11

[#396503] Syntax Highlighter — Intransition <transfire@...>

Would you agree that Ruby shouldn't lack for a syntax highlighting library

18 messages 2012/06/14

[#396589] Unsubcripe — Suresh Rajkumar <sureshrajchennai@...>

Unsubcipe my mail address from the group.

13 messages 2012/06/18

[#396615] Symbols and Strings... — Hal Fulton <rubyhacker@...>

Hello, all...

29 messages 2012/06/18
[#396620] Re: Symbols and Strings... — Eric Hodel <drbrain@...7.net> 2012/06/18

On Jun 18, 2012, at 15:09, Hal Fulton wrote:

[#396641] Re: Symbols and Strings... — Robert Klemme <shortcutter@...> 2012/06/19

On Tue, Jun 19, 2012 at 12:31 AM, Eric Hodel <drbrain@segment7.net> wrote:

[#396643] Re: Symbols and Strings... — Hal Fulton <rubyhacker@...> 2012/06/19

Personally, I don't have a problem with "reducing the contract"

[#396646] Re: Symbols and Strings... — Robert Klemme <shortcutter@...> 2012/06/19

On Tue, Jun 19, 2012 at 5:17 PM, Hal Fulton <rubyhacker@gmail.com> wrote:

[#396659] Re: Symbols and Strings... — Hal Fulton <rubyhacker@...> 2012/06/19

> > Freezing an object also reduces its contract.

[#396678] Re: Symbols and Strings... — Robert Klemme <shortcutter@...> 2012/06/20

On Tue, Jun 19, 2012 at 10:12 PM, Hal Fulton <rubyhacker@gmail.com> wrote:

[#396701] Re: Symbols and Strings... — Henry Maddocks <hmaddocks@...> 2012/06/20

[#396702] Re: Symbols and Strings... — Bartosz Dziewoński <matma.rex@...> 2012/06/20

2012/6/20 Henry Maddocks <hmaddocks@me.com>:

[#396703] Re: Symbols and Strings... — Henry Maddocks <hmaddocks@...> 2012/06/20

[#396710] Re: Symbols and Strings... — Jeremy Bopp <jeremy@...> 2012/06/20

On 06/20/2012 03:58 PM, Henry Maddocks wrote:

[#396627] Does ERB have recursive template support? — Todd Wei <lists@...>

I want to use ERB template library to do some code generation. It

10 messages 2012/06/19

[#396649] Looking for a better way to add a method to a core class than monkey patching — Iain Barnett <iainspeed@...>

Hi all,

17 messages 2012/06/19
[#396670] Re: Looking for a better way to add a method to a core class than monkey patching — Avdi Grimm <groups@...> 2012/06/20

Please do not monkey patch core libraries in gems, unless the *purpose* of

[#396685] Benchmark obsession? — "Jan E." <lists@...>

Hi,

23 messages 2012/06/20
[#396709] Re: Benchmark obsession? — Ryan Davis <ryand-ruby@...> 2012/06/20

[#396815] Array#sample is Set#sample and not Array#sample ! — Michel Demazure <lists@...>

Arrays are ordered, sets are not. Sampling an array should give random

11 messages 2012/06/25

[#396877] CSV.open problem, help please — Kaye Ng <lists@...>

This code doesn't seem to work

21 messages 2012/06/27

[#396896] Copying text from MS Word and wrapping in HTML - help please — Adam Holloway <lists@...>

Hi,

11 messages 2012/06/27

[#396966] Interactions between 'new' and 'initialize' ? — Cees Zeelenberg <lists@...>

In JRuby, I am extending an existing Java Class with a Ruby initialising

9 messages 2012/06/28

[#396975] stack level too deep for quicksort code — bei zhao <lists@...>

Hi, below is my quicksort implementation in ruby(using the first element

12 messages 2012/06/28

[#396996] Accessor Methods with a Twist — Doug Jolley <lists@...>

I am surprised that the code shown below returns, 'Doug'. I would

15 messages 2012/06/29

[#397001] ruby performance — anaray anaray <lists@...>

Hi,

33 messages 2012/06/29
[#397007] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/06/29

The MRI is, unfortunately, slow as balls, and there's not much you can

[#397008] Re: ruby performance — Hans Mackowiak <lists@...> 2012/06/29

Bartosz Dziewo=C5=84ski wrote in post #1066673:

[#397010] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/06/29

2012/6/29 Hans Mackowiak <lists@ruby-forum.com>:

[#397011] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/06/29

2012/6/29 Hans Mackowiak <lists@ruby-forum.com>:

[#397047] Re: ruby performance — "Andreas S." <lists@...> 2012/07/01

Bartosz Dziewo=C5=84ski wrote in post #1066681:

[#397048] Re: ruby performance — Bartosz Dziewoński <matma.rex@...> 2012/07/01

2012/7/1 Andreas S. <lists@ruby-forum.com>:

[#397068] Re: ruby performance — Robert Klemme <shortcutter@...> 2012/07/02

On Sun, Jul 1, 2012 at 1:42 PM, Bartosz Dziewo=C5=84ski <matma.rex@gmail.co=

[#397086] Re: ruby performance — Dan Connelly <lists@...> 2012/07/02

Here's my contribution:

Cannot run a ruby 1.8.7 web-app with ruby 1.9.3

From: Ruby Ruby <lists@...>
Date: 2012-06-08 12:41:50 UTC
List: ruby-talk #396276
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)
2) cgi output is garbled, unusable.

1) gettext
I include the gettext library using require "gettext/cgi"
To control, whether ruby-gettext is installed, I do

[root@myhost ~]# rpm -qa |grep gettext
gettext-0.18.1.1-12.fc17.x86_64
gettext-libs-0.18.1.1-12.fc17.x86_64
rubygem-gettext-2.2.0-2.fc17.noarch
perl-gettext-1.05-24.fc17.x86_64
[root@myhost ~]#

gettext works fine in perl and php, not in ruby.

Because that did not work, I additionally did
[root@myhost ~]# gem install gettext
Fetching: gettext-2.2.1.gem (100%)
Successfully installed gettext-2.2.1
1 gem installed
Installing ri documentation for gettext-2.2.1...
Installing RDoc documentation for gettext-2.2.1...
[root@myhost ~]#
[root@myhost ~]# gem install "gettext/cgi"
ERROR:  Could not find a valid gem 'gettext/cgi' (>= 0) in any
repository
ERROR:  Possible alternatives: gettext
[root@myhost ~]#

To the same issue: gettext does not work.
I thought, I had missed to install an essential library, but could not
find any hint.

What am I missing?


2. cgi output garbled
cgi output starts fine, until it comes to the essential: the dispatcher
of the app. That's where a " (double-quote) character is inserted into
the cgi text, which makes, that from then on all parameter values in the
cgi are escaped with a \ (backslash), unusable for the browser. When the
dispatcher of the app is finished, again a closing " (double-quote) is
dropped into the cgi text, and from then on everyghing is fine. But the
core of the app is unrecognizable by the browser. There are some buttons
in the app, which are created by a different class, they also are
correct. Only the part created by the main application is incorrect.

follows the cgi-text created by ruby 1.9.3:

<snip>
["
<TABLE class=\"topnav\" id=\"table1\" name=\"table1\"><TR><TD
class=\"n\">
<input type='button' class='navbtx' name='down' value='down'
onclick='window.location=\"#down\"' />\n
<input type='button' class='navbtx' name='onemonthago'
value='onemonthago' onclick='oneMonthAgo(this)' />\n
<input type='button' class='navbtx' name='allago' value='all_ago'
onclick='allAgo(this)' />\n
<input type='button' class='navbtx' name='onemonthahead'
value='onemonthahead' onclick='oneMonthAhead(this)' />\n\n
<input type='button' class='navbtx' name='inbetween' value='between'
onclick='inBetween(this)' />\n\n
<input type='button' class='navbtx' name='newentry' value='new entry'
onclick='newEntry(this)' />\n
</TD>\n</TR></TABLE><!-- table1 -->\n\n
<TABLE class=\"status\" id=\"table2\" name=\"table2\"><TR><TD
class=\"n\">
<A href=\"/cgi/actix.rbx?sid=adx_sid.suomi\">actual</A>: today's tasks
for root -> zurrough results found</TD></TR></TABLE><!-- table2
-->\n\n\n\n\n\n\n
<TABLE CLASS=\"topnav\" id=\"table3\" name=\"table3\"><TR><TD
class=\"n\">
<input type='button' class='navbtx' name='up' value='up'
onclick='window.location=\"#top\"' />\n</TD></TR></TABLE><!-- table3
-->\n
<INPUT ID=\"counter\" NAME=\"counter\" TYPE=\"hidden\">
", nil]
</snip>

The main part of the app, in ruby, which generates the wrong cgi-text
is:
(NOTE: the actual class is a sub-class of CGIext, which in turn is a
sub-class of the regular CGI class)

<snip>
        h1{@expires}+
        "#{  # Dispatcher START
        [1,2].collect {
          actix = params["maxipaxi"][0]
          params["maxipaxi"][0] = ""
          case actix
          when "start"
            ab = ActualBase.new(self, dbx, sess)
            ab.contentx(params)
          when "allago"
            ab = ActualBase.new(dbx)
            ab.contentx(params)
          when "nextmonth"
            ab = ActualBase.new(dbx)
            ab.contentx(params)
          when "lastmonth"
            ab = ActualBase.new(dbx)
            ab.contentx(params)
          when "printspecific"
            ab = ActualPX.new(dbx)
            ab.contentx(params)
          when "newentry"
            ab = ActualNew.new(dbx)
            ab.contentx(params)
          when "storenew"
            ab = ActualStoreNew.new(dbx)
            ab.contentx(params)
          when "storechanges"
            ab = ActualStoreChanges.new(dbx)
            ab.contentx(params)
          when "printableversion"
            ab = ActualPrintable.new(dbx)
            ab.contentx(params)
          when "removethis"
            ab = ActualRemove.new(dbx)
            ab.contentx(params)
          when "betweenpopup"
            ab = ActualBase.new(dbx)
            ab.contentx(params)
          when "betweencompute"
            ab = ActualBase.new(dbx)
            ab.contentx(params)
          end
        }

        }"+  # Dispatcher END
        hidden("name"=>"hislis", "id"=>"hislis",
"value"=>CGI::escapeHTML(params["hislis"][0]))+"\n"

</snip>

I was investigating about 4 days what I could have done wrong: no
success. Should I better go back to ruby 1.8.7?

If you need more info, do not hesitate to drop a mail.

Thanks everybody in advance.

suomi

-- 
Posted via http://www.ruby-forum.com/.

In This Thread

Prev Next