289508-291721

289346-332188 subjects 289699-291845

prob with IO.popen
289508 [unbewusst.se] lines = IO.popen( "ls -alR /Users/yt/work/Ruby/IO")

Temporarily dropping root access
289515 [djberg96@gm ] Say I've got a C extension with two rake tasks - 'build' and
289519 [mental@ry ia] Generally speaking, you should be able to use setreuid to set the
+ 289527 [djberg96@gm ] What would you recommend instead then as the best cross-platform
+ 289528 [djberg96@gm ] Oh, and just curious, is there ever a time when you *would* want to
  + 289575 [dangerwillro] Sure!
  | 289576 [fwmailinglis] [..snip..]
  | 289581 [dangerwillro] Well, sometimes installers do build something!
  | 289586 [djberg96@gm ] John, I think you misunderstand. I'm only talking about the build
  + 289637 [kbloom@gm il] You most likely would not, but you are forced to when installing a

[ANN] Mr Bones 1.3.1
289522 [tim.pease@gm] == Mr Bones

How can I get Max Lenght of a Text Field
289523 [dduphorn@re ] Blah = $ie.text_field(:name,$developer_name).MaxLenght()
289524 [dduphorn@re ] You so close.
289559 [lloyd@2l ve ] a = %w(cat mule tiger vulture)

RedCloth full textile support?
289529 [rick.denatal] I'm trying to use the redcloth gem to do textile markup.
289533 [Rob@Ag le on] => "<h1>Heading</h1>"
289536 [rick.denatal] Yep, I'm dyslexic I guess ;-(

Child processes live after parent process is killed
289531 [uwe@ku os h.] I have a Rails app that starts a child process with
289535 [ara.t.howard] google 'zombie process'
+ 289540 [uwe@ku os h.] Thank you for your reply.
+ 289541 [gwtmp01@ma .] The OP was not really describing zombies but instead orphaned processes.
  289550 [ara.t.howard] snip helpful explaintion...
  289553 [gwtmp01@ma .] I see.  That makes sense and avoids any sort of ugly polling mechanism.

Cannot run any gem as non-root user - freebsd 6.2
289534 [gordon@vi i.] On my freeBSD 6.2 laptop I recently installed ruby 1.8.6 and ruby gems
+ 289537 [qpadla@gm il] May i ask you what's the purpose of such self shooting command execution?
+ 289538 [rick.denatal] Looking at the code in rubygems.rb it looks like sitelibdir is nil.
  289542 [gordon@vi i.] Good hunch - it was incorrect values in the setting of "prefix" value in

Ancestor paths
289545 [pedz@ea es f] ActiveRecord does this "trick".  For a normal object, this dump
289548 [pedz@ea es f] <<snip>>
289549 [pedz@ea es f] And, in my case, I added a method to String and to Object (the one in

[ANN] blackbook 1.0.0 Released
289546 [dave.myron@c] blackbook version 1.0.0 has been released!

irb can see the gem but ruby can't
289552 [peter@ru yr ] Hey all,
+ 289563 [ryand-ruby@z] require "rubygems"
+ 289564 [sepp2k@go gl] Probably your .irbrc requires rubygems while your script doesn't.

[ANN] rmmseg 0.1.0 Released
289555 [pluskid@gm i] rmmseg version 0.1.0 has been released!
289560 [yedingding@g] cool~  good job, :)

Comparing Active Record VS Datamapper...?
289557 [softmindtech] Comparing Active Record VS DataMapper...?
289633 [coder68@ya o] I was curious about this myself, I have used AR for years now and I was
289636 [cwdinfo@gm i] - Really modular: Add-ons installed as gems (AR is kind of moving this way)
289649 [james.britt@] Do you know this to be true of Og, or just of DataMapper?
+ 289656 [softmindtech] Can someone pl.guide me what's this thing called " Og ".
| 289657 [jeremymcanal] It's another ORM layer like DataMapper/ActiveRecord.  It's part of the
+ 289658 [cwdinfo@gm i] Sorry. Big clarification. DM does the thing with destroying the data,
  290523 [mbbx6spp@ta ] I have never had a problem getting AR migrations to produce the DDL I
  290537 [ara.t.howard] try defining a column with a default of 'now()' or anything which uses
  290541 [ciconia@gm i] DB.create_table :posts do
  + 290598 [ara.t.howard] can you also do
  + 290827 [mbbx6spp@ta ] Actually for Ruby programmers as opposed to people that only know APIs
    + 290846 [ciconia@gm i] Not true. Sequel includes a model class implementation based on the
    + 290869 [ara.t.howard] this is *way* beyond the abilities of most programmers, however, ruby
    + 291721 [ssmoot@gm il] Ouch Susan. :-)

user information through ldap
289565 [varun.rajesh] i wanna fetch the user information from ldap.If user is authenticated
290131 [damnbigman@g] ...
+ 290141 [garbagecat10] ...
+ 290145 [rha7_@ho ma ] If you're using LDAP to use ActiveDirectory you can use

inspecting the current definition of a method
289567 [frank.mittel] I'm fairly new to Ruby and this may be a RTFM but I couldn't find anything
289569 [frank.mittel] why unfortunately? because it is not straight forward?

Extracting vowels and consonants using regular expression
289572 [Donovan.Dill] I am trying to parse a string and extract all vowels and consonants
289573 [stefano.croc] class String
289580 [robert.dober] Not sure if OP excluded non letters from the input
289589 [coreyhaines@] ...
289613 [robert.dober] Excellent Corey, allow me to make it fit *any* string, I still have
+ 289614 [robert.dober] and some golfing
| 289616 [coreyhaines@] ...
+ 289615 [coreyhaines@] ...
  289619 [robert.dober] Oh sorry using 1.9 excluseviley now...
  289623 [coreyhaines@] ...
  289624 [donovan.dill] Thanks Robert, Corey, Philip, Stephano, et. al, for all of the great
  + 289626 [coreyhaines@] ...
  + 289632 [no@sp m. le ] What about diphthongs? Technically a diphthong is *one* vowel
  | 289645 [Donovan.Dill] Good idea --this is made for Ruby Quiz. How does one submit a problem?
  + 289747 [Donovan.Dill] d"
    289974 [Donovan.Dill] 'y'

eRuby giving problems with http.rb
289574 [adityanag.na] I have downloaded a piece of code in ruby that will get quotes from
289577 [jan.svitok@g] (Without reading your full post:) The error says dns doesn't work.
289588 [adityanag.na] Thanks for the reply.
289598 [jan.svitok@g] as I have written, I haven't read your full post ;-) So, after your
289655 [adityanag.na] Thanks a lot for your time.
289786 [jan.svitok@g] In april, there was similar problem in the thread "eruby & Mechanize
289787 [jan.svitok@g] erb - bundled in one-click
289879 [adityanag.na] Thanks a lot.

Ruby And Threads
289578 [w__magician@] I need make my application execute 5 operations in the same time, for
289583 [thopre@gm il] ...
289587 [w__magician@] Is one class extended to the Thread class and whith one specific
289590 [mailing.mr@g] Why would you do that?
289631 [no@sp m. le ] There might be good reasons to do that. I often subclass Thread to

[ANN] FastRI 0.3.1: faster, Leopard compatibility, etc.
289579 [ mfp@ac .o g] FastRI is an alternative to the ri documentation browser for Ruby.
+ 289600 [vjoel@pa h. ] Does this happen to anyone else?
| 289605 [vjoel@pa h. ] fastri-server -b
+ 289683 [botpena@gm i] forgive the dumb question, but how can i make fastri work for ruby1.9?
| 290164 [drbrain@se m] Are you really concerned about 1/10 of a second?  (All times with hot
| 291478 [ mfp@ac .o g] I haven't ported it to 1.9 yet, mainly because 1.9.0 is still too unstable.
| + 291493 [james@gr yp ] Amen.
| | + 291507 [james.britt@] I'm curious if drbrain is planning any changes to rdoc that would change
| | | 291594 [ mfp@ac .o g] FastRI gets the documentation from ri's datastore(s) but does one thing
| | | 291656 [james.britt@] Ah, good to hear.  Thank you.
| | + 291580 [devi.webmast] I second. The first thing I tell new Ruby programmers is to use
| | + 291592 [ mfp@ac .o g] It goes against the current trend of moving stuff out of the standard library
| |   291620 [james@gr yp ] I understand why we should do that when a standard library really
| + 291578 [drbrain@se m] If "many" people are having this problem, I would expect one of them
|   291599 [ mfp@ac .o g] I attribute that to the "broken window effect". Once a piece of software is
+ 289964 [daniel.schoe] Hm, the times are different on my box (P4 2.4 GHz, 1 G RAM,
  291480 [ mfp@ac .o g] The times you quoted were taken on a machine more or less comparable to yours.

creating a 2d array
289582 [adamtemporar] programming. Im trying the simple matrix problem to get used to dealing
+ 289606 [caduceass@gm] x, y = 2, 3  #you get these values from the user
| + 289780 [adamtemporar] thanks that does help indeed.
| + 289781 [micathom@gm ] Array.new(x) {Array.new(y)}
+ 289783 [cameron.mcbr] There is a matrix class in the stdlib.  But if you're doing anything
  289985 [adamtemporar] Why do you use the {}? Arent they used when your creating hashes.
  289987 [no@sp m. le ] This is a block (like do...end), not a Hash, in this context.
  289996 [adamtemporar] Ok i think i kinda understand. Could you tell me if this is something
  290006 [no@sp m. le ] Worth reading in detail: <http://ruby-doc.org/core/classes/Array.html>.

env command
289584 [croese@gm il] ...
289595 [devi.webmast] Daniel Brumbaugh Keeney
289607 [croese@gm il] ...
289617 [fwmailinglis] In short, you're hosed in regards to that particular method.
289621 [croese@gm il] ...

treetop equal precedence
289591 [MistryMan400] ...
289628 [no@sp m. le ] I don't understand how your example relates to the way you worded your question,

mySQL Ruby Gem and MAMP mySQL
289593 [mtlmeijer@gm] I'm not having much luck installing the mysql Ruby gem to use the mySQL
289594 [louisjuska@g] (since you're running osx)
289596 [mtlmeijer@gm] thanks Louis,
289648 [louisjuska@g] my guess--and it's *only* a guess--given the instructions on that

I feel like this is a dumb question....
289599 [hickmanchris] I am trying to call a method where the name is based on a parameter.
+ 289601 [james@gr yp ] obj.send("template#{sec_id}")
+ 289602 [vjoel@pa h. ] send "template#{sec_id}"
| 289604 [hickmanchris] awesome, I have used the string concatenation in rails for links and
+ 289603 [jcribbs@ne p] obj.send("template#{sec_id}")

Putting A Program Online
289608 [nonstickglue] If I were to give someone access to a subdomain of mine and all the

Strings .each method
289609 [hickmanchris] I am using .each to pull apart a string at every space.  Is there a way
+ 289610 [lloyd@2l ve ] a = "This is a big old string."
| 289611 [hickmanchris] I have something like the following.  I tried to make it a little
+ 289612 [coreyhaines@] ...
  289618 [hickmanchris] It is kind of hard to explain but I have a long string that someone
  + 289620 [Rob@Ag le on] => true
  | + 289622 [hickmanchris] Awesome.  I understand how to use it but what exactly does %-10s %s"%
  | | 289625 [Rob@Ag le on] That's a way to do formatted output like Kernel.sprintf, but shorter
  | + 289627 [coreyhaines@] ...
  |   289629 [hickmanchris] Thanks a lot!
  + 289642 [kbloom@gm il] Might I suggest that using REXML (or another XML parser) may make more
    289784 [brainychip@g] ...

how does sort work?
289630 [chris.sepic@] I'm confused as to how the sort method works.
+ 289638 [bbxx789_05ss] Sorting arrays is a complex topic that has been given a lot of attention
+ 289640 [summercoolne] to understand this, you can think of "sort" taking a function as a
  + 289644 [chris.sepic@] I understand sorting and sorting algorithms - I was tripped up by the
  | 289690 [shortcutter@] Yeah, a block is an anonymous function.
  + 289646 [caduceass@gm] On Feb 2, 2008 8:02 PM, SpringFlowers AutumnMoon

Why is my var undefined?
289634 [TimWelsh5@gm] index=0
+ 289635 [coder68@ya o] It's only defined for the scope that it's in.. which is the "if" block..
| 289662 [sepp2k@go gl] It's not local to the if-block. It's local to each execution of the each-
+ 289650 [caduceass@gm] you could insert "smallest = nil" here
| 289651 [caduceass@gm] Sorry, these lines are supposed to be...
| 289659 [dubnik@gm il] ?In Ruby 1.9, finding indexes of all elements which have minimal value
+ 289661 [eeklund@gm i] Add
  289664 [eeklund@gm i] This was slightly clumsily written; the variable leak through to the
  289692 [TimWelsh5@gm] Thanks to all for the help.  I take it from the comments here that any

[ANN] Webby 0.7.2
289641 [tim.pease@gm] == Webby
291131 [leslieviljoe] 1. Is there a directory in the webby structure where I can put files
+ 291135 [leslieviljoe] I see there is an @pages variable but not quite sure how to access an
| 291136 [leslieviljoe] <%= link_to_page("click here", :title => "Management") %>
+ 291161 [tim.pease@gm] I should probably make one.
  291428 [leslieviljoe] Because the "url_for" function produces url's that start with a "/",
  + 291465 [leslieviljoe] def url_for( *args )
  + 291549 [tim.pease@gm] I can't think of a problem that it will cause, but I also can't think

Re: blackbook 1.0.0 Released
289647 [matthieu.sto] This looks like a really, really useful library.
290333 [matthieu.sto] I managed to get this working by making a simple change to gmail.rb in

[ANN] Ruby-GetText-Package-1.90.0
289660 [mutoh@hi hw ] Ruby-GetText-Package-1.90.0 is now available.

Find help for learn ruby
289663 [robertzhang1] ...
+ 289668 [bbxx789_05ss] Download ruby 1.8.6.  The download page will list downloads for
+ 289672 [jari.william] Use the one-click installer for Windows. It should set it up for use
  289705 [bpaschen@go ] Or read "Why's (poignant) guide to ruby" (http://poignantguide.net/

best server
289673 [junkone1@gm ] which is best server.

Ruby for game programming
289674 [darrin_allen] Is anyone using Ruby for game programming?
+ 289677 [james@gr yp ] I have used Ruby for game programming multiple times.
| 289691 [matthew.moss] What games, James? I like TBS.  =3D)
| + 289740 [james@gr yp ] I've made a couple of little projects in the past that some friends of
| | 289761 [jgabrielygal] One of my plans has always been to build online turn based strategy games,
| | + 289778 [fred@la av .] Same here.  I find that using Ruby on Rails for the "interface" and pure
| | | 289779 [jgabrielygal] es,
| | | 289792 [huw@da kn on] Not all games are 'graphical' of course ;-)
| | | 289804 [james@gr yp ] Absolutely.  I've considered porting PAWS from the Python world.  That
| | + 289805 [james@gr yp ] Thanks for the offer of help.
| + 289741 [phil@s1 6. e] me too! is there a ruby tbs interest group?
+ 289686 [jari.william] Best regards,
+ 289700 [netghost@gm ] Absolutely, if you're interested in 2d game programming, check out
+ 289701 [markonlinux@] cheers,
| 289857 [aok@ch ri ts] ...
+ 289729 [james.britt@] James Britt
+ 289760 [jl235@ke t. ] I've tried to make others too, and I do love programming in Ruby, but

assert_equal problem
289676 [ranieri.tx@g] ...
+ 289680 [brandon.g.jo] Federal do
+ 289697 [no@sp m. le ] Read this and you'll understand.
  289848 [ranieri.tx@g] ...

Treetop: Can the parser be put inside a module?
289679 [pluskid@gm i] I'm wondering if Treetop can provide (or is it already have?) a
+ 289695 [rubyfan@gm i] tt my.treetop
+ 289698 [no@sp m. le ] The Treetop meta-grammar allows you to define your grammar inside a
  289738 [pluskid@gm i] Yes! That's exactly what I'm looking for! Thanks!

Re: Parsing JSON (#155)
289684 [micathom@gm ] I liked this quiz because it made me look into treetop, ragel and
289688 [micathom@gm ] Here is a patch to make my solution check the return value for
289694 [pawel.j.rade] And here's my solution. It passes all given tests but still there are
289724 [rubytraining] Here is my solution, which, like steve's, uses Treetop.  This is my
289756 [micathom@gm ] I think he meant that it doesn't throw exceptions on error. This is
+ 289757 [micathom@gm ] I was slightly surprised to find this in a full-blown parser. I think
| + 289758 [micathom@gm ] People should really test their test case. At least I should test mine
| | 289769 [bonzini@gn .] Here is my try using regexes.  I use the "copy-on-write trick" from
| | 289775 [bonzini@gn .] For what it's worth, I get 144kb/sec from tho_mica_l's solution, after
| | + 289793 [transfire@gm] Just an FYI solution, JSON is a subset of YAML. So
| | | 289794 [micathom@gm ] irb(main):006:0> YAML.load_file 'test.json'
| | + 289800 [eric.mahurin] ...
| |   289812 [bonzini@gn .] Especially if you take it a bit to the edge like this (plug into the
| |   289816 [micathom@gm ] I'm not sure I understand your argument. f will always be considered
| |   289817 [micathom@gm ] Well, I missed the changes in the regexp and thus missed your point.
| |   + 289890 [micathom@gm ] It seems though, if I may say so, that *cough* certain solutions don't
| |   + 289899 [bonzini@gn .] I think it's just that ?<...> is slower than $n.  Could you try
| |     + 289906 [micathom@gm ] $ ruby benchmark_eric_mahurin.rb i_18
| |     | + 289916 [bonzini@gn .] Uh-oh.  Someone should write to ruby-core?
| |     | + 289937 [eric.mahurin] ...
| |     |   289956 [micathom@gm ] Since I ran my first preliminary benchmark I have been asking myself
| |     |   289968 [eric.mahurin] ...
| |     |   289983 [james@gr yp ] Sorry about that.  GhostWheel doesn't need to instantiate the parser
| |     |   289999 [eric.mahurin] ...
| |     |   + 290000 [james@gr yp ] Oops.  ;)
| |     |   | 290010 [eric.mahurin] ...
| |     |   | + 290012 [no@sp m. le ] Agreed. It should however be possible to modify a Regexp engine to
| |     |   | | 290023 [eric.mahurin] ...
| |     |   | | 290031 [no@sp m. le ] I submit that if your code is as fast as a Ruby Regexp,
| |     |   | + 290069 [micathom@gm ] They are a convenient solution for a wide range of problems.
| |     |   |   290099 [eric.mahurin] ...
| |     |   + 290109 [james@gr yp ] #!/usr/bin/env ruby -wKU
| |     |     290234 [eric.mahurin] ...
| |     |     290238 [micathom@gm ] May I ask which test are missing here, since it passes all my test.
| |     |     290251 [eric.mahurin] ...
| |     + 289907 [micathom@gm ] $ ruby benchmark_eric_mahurin.rb i_18
| + 289772 [no@sp m. le ] At least I *admitted* to cheating :-).
+ 289770 [no@sp m. le ] If you check my version, you'll see that you can raise a meaningful
threads.html
top