341303-345932

341121-347225 subjects 341512-346340

^ time for a FAQ again?
341303 [rogerpack200] It seems that old ruby-talk FAQ's have become unmaintained or what not.

^ Ruby 1.8.6 One-click installer rbconfig.rb file
341309 [jdezenzio gm] I can't seem to locate the rbconfig.rb file when I installed the 1.8.6
341321 [rogerpack200] lib\ruby\1.8\i386-mswin32
341368 [jdezenzio gm] thanks Roger..

^ rss parsing error.
341310 [ygpark2 gmai] At these days, I try to parse 'http://www.forbes.com/news/index.xml' using
+ 341314 [machese gmai] I think you may checkout universal feed parser at feedparser.org,
| 341398 [kou cozmixng] In <587ca64f0907130826q6eebbb0ar8c7b3404a277f522@mail.gmail.com>
| 345872 [zotium gmail] Has anybody tried comparing Feedzirra vs Universal Feed Parsers
+ 345932 [8si.greg gma] Glancing at the output of their feed I see no malformed RSS. I do see

^ MYSQL insert
341312 [ja_bowen yah] I'm trying to insert values from a variable into a test MYSQL.  It works
341313 [jan.svitok g] use double quotes, and enclose with \"#{}\". single quotes don't
341318 [Rob AgileCon] Also, this is ruby, not perl. Unless you have a "really good

^ gem cleanup and "dependencies will not be met"
341323 [vjoel path.b] If you remove this gems, one or more dependencies will not be met.
341357 [rogerpack200] Hack it in and submit a patch to the rubygems fellas :)

^ C ext / threading / callback issue, ruby-1.9.1p129
341325 [reynhout que] I've never written a C extension for Ruby before, and I'm struggling with
341355 [rogerpack200] Hmm.  MRI isn't "used" to other threads running--are you running 1.8.6
341399 [reynhout que] I'm using 1.9.1p129, but I tried the FFI version under 1.8.6 too, and
341405 [rogerpack200] Does the callback use ruby code from within the thread blocking region?
341420 [reynhout que] rb_thread_blocking_region((rb_blocking_function_t *)w->callback, tmp_x,
+ 341452 [luislavena g] Ruby-FFI issues, more related to callbacks can be asked at Ruby-ffi
| 341454 [reynhout que] Sorry, I didn't mean to confuse the issue by mentioning FFI.  I did try
+ 341497 [rogerpack200] Hmm.  This question might be more easily answered by the core folk, but

^ rb_eval_string blocks on loops even if run inside a thread.
341329 [port001 gmai] Hey,
341337 [brabuhr gmai] This is the first time I have ever tried embedding Ruby in C, but I
341342 [port001 gmai] Thanks,

^ OT: "show run" parser
341330 [swittenk yah] Dear Rubyists,
+ 341367 [lists bertra] I don't know the "show run" command and what you want to parse out
+ 341393 [eddie holyro] It's difficult to have a generic tool for Cisco configs considering the vast

^ unsubscribe
341333 [nverni blend] ________________________________

^ Performance question
341334 [rps salas.co] I have a scenario where I will be storing thousands of objects in an
+ 341335 [vjoel path.b] Probably the hash representation, but what about an array of
+ 341336 [bg-rubytalk ] Thousands of records, each with two fields is a very small amount of data.
| 341347 [rps salas.co] The example I gave was purposely oversimplified to make it easy to
| + 341364 [bg-rubytalk ] Ok, well if you have an average number of bytes per record, you can
| + 341370 [ninja slapha] Definitely no, because it looks like you're using symbols, not strings. In 1.8,
+ 341354 [rogerpack200] My answer is try them each and find out :)

^ Error accessing X.Org commands with ruby shell command scripts
341338 [gregory.mazu] I am trying to run an X.Org command from within ruby's shell commands and am
341340 [vjoel path.b] `env DISPLAY=:1 firefox`
341341 [gregory.mazu] Joel, thank you.

^ Looking for a rack middleware to dump http request response traces
341339 [rick.denatal] I was thinking about writing a rack middleware which would dump each

^ New to Ruby; need some help
341343 [cmays90 gmai] I am still working with console apps and do not see myself moving away
341361 [howardrobert] Chris,

^ using ImageJ from Ruby
341344 [chen_li3 yah] I am just curious if I can ask ImageJ(http://rsbweb.nih.gov/ij/) to

^ New to Ruby; need some help
341346 [cmays90 gmai] I am still working with console apps and do not see myself moving away
341360 [rogerpack200] * ext/readline/extconf.rb: checked rl_set_screen_size and

^ (just) retrieve and unpack a gem
341348 [rdm cfcl.com] I need to retrieve and unpack a large number of gems, without
+ 341350 [geistteufel ] Do it like this
| 341353 [vjoel path.b] Won't that still install bin stuff? For example, gem install rake.
| 341356 [geistteufel ] gem fetch rake
+ 341352 [rogerpack200] Oh no--you can unpack arbitrary gems [I think that's the only ones you
| 341359 [rdm cfcl.com] $ gem unpack rails.2.3.2.gem
| 341362 [geistteufel ] no prob !
+ 342100 [drbrain segm] There's probably a feature request for that, but I've not bothered to

^ gem1.9 install mysql on ruby 1.9.1p129 failed
341351 [geistteufel ] I'm trying to install mysql gem on ruby 1.9.1p129.

^ gem1.9 install mysql on ruby 1.9.1p129 failed
341358 [geistteufel ] I'm trying to install mysql gem on ruby 1.9.1p129.
341363 [rogerpack200] You're going to want to install version 2.8.1 for ruby 1.9
341386 [geistteufel ] Ok I see
341389 [geistteufel ] Thanks ! hectoregm-mysql-ruby works !
341403 [rogerpack200] gem sources -a http://gems.github.com
341449 [geistteufel ] ok I see.

^ Getting time to display with ruby Logger
341366 [harnish_544 ] Hey guys,
+ 341373 [vikassarin q] You could try
| 341374 [harnish_544 ] That's not what I am looking for.  I want to use the Logger class to
+ 341375 [vjoel path.b] Your code outputs in that format for me, on ruby-1.8.6. Does it make a

^ DBI and SQLite3
341372 [fontenot.103] I'm trying to load an SQLite3 database with the DBI and I need some
341377 [pierr.chen g] You might want to try "select tbl_name from sqlite_master where

^ a regex that does not contain comma
341376 [sijo maxxion] Could anybody please tell how to write the validates_format_of a
+ 341378 [aschmalowsky] unless ( string =~ /((?>\w+\s*(?=,))+)/ )
| 341380 [sijo maxxion] Thanks for the reply..And I tried in the rails project like
| + 341381 [aschmalowsky] #! /opt/csw/bin/ruby
| + 341400 [mark thomasz] dation
+ 341385 [justincollin] I believe
  + 341387 [sijo maxxion] Thanks Justin for the reply. It worked.
  + 341388 [aschmalowsky] #! /opt/csw/bin/ruby
    + 341390 [sijo maxxion] What I need is if there is any comma in the string it should fail and
    + 341392 [sepp2k googl] Your code expects the regex to match if the string contains a comma and not
    | 341395 [aschmalowsky] not
    | + 341396 [mnjagadeesh ] Why cann't you look for ,  only?
    | + 341397 [sepp2k googl] Wich does not work if you pass the regexp as an argument to a method instead
    + 341394 [glennj ncf.c] case string
      341406 [dblack rubyp] string = <<-EOM
      + 341410 [aschmalowsky] Technically, the regexp above always succeeds (iirc).
      | + 341411 [dblack rubyp] Ha -- yes, it does indeed always match. I was too focused on the ^$
      | + 341431 [justincollin] The OP needed something that would match only if there were no commas. I
      | + 341461 [glennj ncf.c] Always?  Only if a newline appears before the first comma.
      |   341533 [mnjagadeesh ] Everytime regex is a costlier operation. So for this task why can not
      + 341459 [glennj ncf.c] Yes, I could have used the else clause, but I wanted to explicitly spell

^ Twelve rules of Ruby
341379 [panu.kinnari] Scott Adams of Dilbert fame talked about learning twelve concepts of
+ 341404 [karottenreib] returning from a block is different from returning from a lambda is
+ 341408 [dblack rubyp] Here's half a dozen. I would say that if everyone understood these
  + 341412 [dblack rubyp] Not sure why they wrapped weirdly (at least on my screen), but here's
  | + 341423 [garryfre pac] I would think that the twelve rules should be in the form of what things are, not what they are not.
  | | + 341424 [dblack rubyp] I suppose I'm very teaching-oriented, in the sense that I'm mainly
  | | | 341427 [shevegen lin] Hey David, you gotta tell this Dave Thomas so that he can talk about
  | | | + 341433 [dblack rubyp] That's what keeps it interesting, isn't it? :-)
  | | | | 341441 [rick.denatal] I know what you are driving at, but there are some things about your
  | | | | 341448 [vjoel path.b] Yep. You said it better than I was about to (not just this line, but the
  | | | | + 341450 [dblack rubyp] I'm not sure what the point of these analogies is, I'm afraid. I don't
  | | | | | 341457 [vjoel path.b] Exactly. There might be a compatible ruby interpreter in which each
  | | | | | + 341465 [rubfor recit] The original example was about how to approach keeping your house cool,
  | | | | | | 341483 [james.britt ] It's the Blub thing.
  | | | | | + 341477 [dblack rubyp] The things I'm talking about are not MRI quirks, though; they're ways
  | | | | | + 341524 [rogerpack200] I just learned something--I didn't know you can infer a methods owner
  | | | | + 341482 [ian.hobson n] I agree that a beginner needs a model. It is (IMHO) more important that
  | | | | | 341484 [dblack rubyp] A lot of what's involved in teaching, too, is deciding what *not* to
  | | | | + 341538 [robert.dober] Probably. I feel that David is right, well I know he is, on technical
  | | | + 341445 [james.britt ] Related to this, objects do not have "attributes" or "properties"; they
  | | + 341428 [eleanor game] I think the point is that most people involved with Ruby - even those
  | + 341468 [ryand-ruby z] Rick did a very good job with some of the philosophical wanking but I
  | | + 341480 [dblack rubyp] Well -- either one is shorthand, in the sense that when actually
  | | + 341481 [rick.denatal] Well almost
  | |   341507 [eleanor game] Much of this conversation (specifically regarding "has") reminds me of
  | + 341499 [minilith gma] Since methods are bound to a certain evaluation context (ie the object
  |   + 341503 [panu.kinnari] Thanks for all the responses. I have to read this more than once to
  |   + 341515 [dblack rubyp] This message is in MIME format.  The first part should be readable text,
  + 341416 [tomcloyd com] Very interesting David. Thanks for these!

^ Array function?
341382 [tha_man884 h] object which is the player shall the player got one card (number between
341401 [bg-rubytalk ] You could do something convoluted like this, where you generate a random card

^ can't install ruby-prof 0.7.0 or superior on windows
341384 [nospam free.] I found windows users of 0.7.3 here but I still can't instal
341407 [rogerpack200] gem install rake?
341421 [nospam free.] rake is installed and up to date. still no change - same error.
341435 [rogerpack200] Ah are you building from source? If so you'll need a compiler [see my
341447 [nospam free.] I'd rather not install from source. It seems overkill for
341451 [luislavena g] Politely ask the gem author to use rake-compiler to properly build
341500 [nospam free.] There is already a windows gem but it doesn't install.
341546 [luislavena g] The gem is prior version 0.7, and that one do not work for you, as you
341563 [nospam free.] Sorry. Sorry. I simply mean, there is some users on windows (found 2

^ Using DLLs with my Ruby app
341391 [gin18em hotm] A new ruby user here. I want to try using ruby to use an API for
+ 341430 [martinhess m] Have you tried without the @20 on the end?
+ 341438 [eleanor game] extern "void _serverLogon(string, string, string, void, void)"
  341462 [gin18em hotm] Thanks for the replies!
  341474 [eleanor game] I'm not on a Windows box so I can't easily test how dll function =20
  341505 [gin18em hotm] Thanks Ellie, I'm making a bit of progress here, this is what I did.

^ Elegant solution for inverting zip?
341413 [gregory.t.br] I came across something I thought should have an obvious answer and
+ 341417 [dblack rubyp] a.transpose, n'est-ce pas?
+ 341418 [gregory.t.br] *facepalm*  Array#transpose is what I needed, I can't believe I forgot
  341425 [b.candler po] That's funny - I was just trying to do more or less the same thing the

^ Re: Twelve rules of Ruby.
341429 [garryfre pac] ________________________________
341432 [eleanor game] I can't comment on the Rails side of things as that's not my primary
341446 [james.britt ] Grab Greg Brown's Ruby Best Practices, too.

^ array.include?  I do not seem to GET it
341434 [byrnejb hart] def initialize(argv)
+ 341436 [byrnejb hart] P.S.  This gives exactly the same output
+ 341437 [rogerpack200] maybe you could add a
| + 341440 [byrnejb hart] puts @argv.class
| + 341443 [byrnejb hart] puts @argv.class
+ 341439 [sepp2k googl] arr = ["1", "2", "3\n4", "5"]

^ Ruby SMTP server?
341453 [ninja slapha] So, Slashdot linked to an interesting Zed rant today, which linked to this=
341540 [rogerpack200] =r

^ getting 500 error while deploying to bluehost please help
341455 [sagarwal1981] I am getting 500 error while deploying to bluehost , please provide some

^ sysread problems
341456 [ragnell255 k] I want to open a file and store its contents in an array.  When I read
341463 [rmagick gmai] If you're running on Windows, and the files you're reading contain
341464 [ragnell255 k] Wow, thank you!!  It works perfectly now!!

^ STDOUT
341458 [agus_85 hotm] files, and log the output in a txt file.
341460 [cdallas gmai] You're looking for something like
341466 [agus_85 hotm] Nono, the scripts that i'm running print in the screen "Testo Ok" or
341467 [matthew.hinm] results = `ruby #{scriptFolder}/#{file}`
341471 [agus_85 hotm] With this line results = `ruby #{scriptFolder}/#{file}` i'm saving only
+ 341473 [matthew.hinm] Using ` instead of " executes the command and returns a string of the outpu=
| 341479 [glennj ncf.c] output = %x{ruby #{scriptFolder}/#{file}}
+ 341476 [i3dmaster gm] NO, its a back tick, not a quote. Look carefully.

^ rdoc run-time length question
341470 [tomcloyd com] I note that if I don't delete the relevant /docs dir, then each time I
341486 [tomcloyd com] tomc@tomc-desktop:~/Ruby-work/setnet/lib/setnet$ ls
341487 [justincollin] It's processing the doc/ directory.
341502 [tomcloyd com] I don't understand - processing involves doubling the time and files.
341506 [justincollin] I would not say  you are running it wrong (though I am far from an rdoc
+ 341523 [tomcloyd com] Justin,
| + 341529 [vjoel path.b] This used to work very nicely in the old framed rdoc template, and I'm
| + 341717 [drbrain segm] Since darkfish, this feature hasn't been restored.  Until I get around
+ 341527 [tomcloyd com] Followup on my last post: these rdoc run parameters also seem to have NO
  + 341528 [vjoel path.b] It used to work, but maybe that was only with the older templates
  | 341530 [tomcloyd com] Well, there's more to the story! It actually does work - as you
  + 341718 [drbrain segm] Unless you file a bug this won't get fixed.

^ Ruby substitute for Miro?
341472 [phil pricom.] People,
343982 [thopre gmail] 2009/7/14 Philip Rhoades <phil@pricom.com.au>

^ Test::Unit advice - blocking method
341485 [djberg96 gma] I've got a method in the win32-clipboard library, Clipboard.notify_change,
341541 [rogerpack200] maybe use 1.9 with thread_blocking_region's? Maybe use two processes?

^ Trying to parse stream.twitter.com, please help.
341488 [tefflox gmai] I'm having no luck working on this, and it's my first attempt at such a
341490 [wishdev gmai] My god how low has the world gotten - it's one thing for a kid to beg for
+ 341491 [tefflox gmai] That's very assuming.  Good job, you're typical.
+ 341492 [tefflox gmai] A man of such integrity as John W Higgins would surely code in the
  + 341493 [wishdev gmai] My sincerest sympathy (I can't think of a better term here but I mean no
  + 341494 [tefflox gmai] I've been working on this for five hours and the closest thing this week
    341508 [rilindo gmai] FWIW, why are you trying to use an external process within the ruby
    341516 [tefflox gmai] Finally made some progress, which means one less grudge :-)  I'm

^ Using the FIPS compliant openssl libs
341489 [timuckun gma] I have built the FIPS compliant openssl libraries on my machine and

^ doubts about ruby
341495 [marcosvanett] code in some examples that I've found in github.

^ [QUIZ][SUMMARY] Genetic Programming (#212)
341496 [yahivin gmai] Sander Land's solution used Charlie[1] a library for genetic
341559 [brabuhr gmai] Cool.  I was not thinking and I rebooted while my script and output

^ Problem with xpath in scrubyt.
341498 [likhon gmail] But when I run this code using firefox agent it return perfect
+ 342369 [aaron tender] Firefox adds the "tbody" node.  Try your xpath again, but remove
+ 342379 [mark thomasz] Positional XPaths like this are fragile. I don't recommend just taking

^ Can we stop internal redirects
341501 [nidhigupta25] I have been trying to write a ruby script using a mechanize library.
341504 [wishdev gmai] 3 options depending on exactly what you desire

^ Search in string with regular expression
341510 [micke.sommar] I'm trying to build a new string from a existing one.
+ 341511 [chen_li3 yah] irb(main):001:0> str1 = 'my frog name is froggy'
+ 341513 [robert.dober] Maybe
  341514 [list.push gm] Or maybe, :)
  341517 [robert.dober] No it was not a typo, I thought that \B was matching at the end of the
  + 341518 [robert.dober] I mean \B is not a word boundary and \b is a word boundary and I
  + 341519 [dblack rubyp] => "o"
threads.html
top