208055-250370 subjects 208427-400232

How to add own blog to "Planet RubyOnRails"
208225 [anatol.pomoz] Could anybody tell me how to add own blog (

Re: sh command that ascends dir tree for executable
208252 [transfire@gm] Thanks Jeffrey and Ken. I was thinking maybe there was a util for this
208264 [transfire@gm] Dir.chdir('..') until File.exectuable?( file ) or Dir.pwd == '/'
208290 [kbloom@gm il] Does Pathname.getwd.parent==Pathname.getwd work on Windows?
208340 [transfire@gm] Guess I don't have much of choice. Pretty sad choice though. I can't
208344 [transfire@gm] I'm not going to bother with a whole module. It's been done before.
208367 [transfire@gm] File.expand_path('/')
208379 [transfire@gm] def FileTest.root?(dir)
208533 [kbloom@gm il] Why not use this code to redefine Pathname.root?

hash.keys and hash.values
208253 [mage@ma e. u] I know the order of the keys of a hash is arbitary. However, has the
+ 208256 [hal9000@hy e] They'll certainly be the same order. It would be crazy otherwise.
| 208262 [perrin@ap th] Not necessarily.  It could be that, when calling on them separately,
| + 208274 [halostatue@g] They would be the same order so long as no changes have been made to
| + 208343 [mage@ma e. u] On the second week of my Ruby "experience" I found myself writing a
|   + 208345 [shortcutter@] Here's another solution - maybe it's even more efficient as it doesn't
|   | + 208351 [mage@ma e. u] Thank you, maybe I will benchmark this at home against the transpose
|   | + 208378 [erikveen@gm ] Well, a quick benchmark... No, it isn't more efficient. Neither
|   |   208399 [shortcutter@] Your test doesn't prove higher memory usage for the inject version.  The
|   |   208408 [erikveen@gm ] Remember, both to_a and transpose are implemented in C.
|   |   208484 [shortcutter@] ...
|   |   208667 [mage@ma e. u] Well, I like Ruby's community.
|   + 208390 [perrin@ap th] I stand corrected.
+ 208304 [erikveen@gm ] keys, values = hsh.to_a.transpose
  208341 [mage@ma e. u] Thank you, I like to be 100% sure, so it's comfortable.

[Solution] Re: [QUIZ] Pen and Paper (#90)
208254 [robert.evans] Here's my solution that does not roll over the edges. I'll post that

Where's Enumerable?
208266 [ihatespam@ro] require 'Enumerable'
+ 208267 [hal9000@hy e] You're looking too hard. :) It's not in a file, it's
| 208271 [ihatespam@ro] Ah, thank you.  I would never have guessed that I _was_ looking too
| 208276 [logancapaldo] On Aug 13, 2006, at 10:15 PM, Just Another Victim of the Ambient
+ 208268 [rick.denatal] On 8/13/06, Just Another Victim of the Ambient Morality

How do you use flock and clean up lock files?
208272 [john.carter@] So I'm using flock, but I have this noxious race condition when I try to
+ 208281 [garbagecat10] ...
| 208285 [john.carter@] Sigh! Just seems so...messy.
| + 208286 [cbrown@at as] Sorry to jump in on the thread like this...
| | 208288 [john.carter@] I'm have a generic Daemon class exactly like Process.fork but
| | + 208289 [billk@ct .c ] Cry, mostly.
| | | 208324 [khaines@en g] It depends on how close to fork() your needs are.
| | + 208292 [cbrown@at as] Ah, gotcha.  You really don't need strong cross-process synch, but
| | + 208310 [garbagecat10] I have to say that in my opinion, none of the problems you're trying
| |   208423 [john.carter@] I know, that's why I assumed there was a standard solution I was missing.
| |   + 208424 [garbagecat10] CreateProcess is a Windows API. So is CreateMutex, which you'll want
| |   + 208429 [khaines@en g] win32-process, found at http://rubyforge.org/projects/win32utils/ makes it
| + 208308 [ mfp@ac .o g] You can check if the file you got a lock on is the one presently on the FS.
+ 208457 [johnatl@ma .] John,

[QUIZ][Really bad solution] Pen and Paper (#90)
208275 [bulliver@ba ] charset="iso-8859-6"

Multiple assignment in a hash
208279 [devlists-rub] Anyone know of any ruby shortcuts for multiply assigning elements in a hash?
+ 208282 [logancapaldo] keys = %w(one two three)
| 208313 [robin@ni or ] hash = {}
| 208327 [logancapaldo] I dunno. Didn't think of it at the time.
+ 208371 [daniel.schie] Perhaps this?

configureing Ruby cgi http.conf
208283 [derek@we tc ] I know that this is a simple problem but.
208287 [james.britt@] You may need to tell Apache to execute the file as CGI

208296 [seatmanu@ya ] CAn someone give me an example of GTKTrayIcon?

[MacOS X Ruby-ext] errors in include "CFURL.h"
208298 [pere.noel@la] now, my skeleton is working (thanks to ) i want to add Carbon function
208302 [luc@ho k- on] CF = CoreFoundation != Carbon.
208305 [pere.noel@la] $CFLAGS << " -I
+ 208307 [pere.noel@la] LDFLAGS="-Wl,-read_only_relocs,warning"
+ 208328 [dharple@ge e] Try linking against the framework using the -framework flag.
  208335 [pere.noel@la] fine thanks, it's ok now for the links, however i get a bus error at
  208338 [dharple@ge e] What is the output from the printf statement?
  + 208339 [dharple@ge e] Oh wait, never-mind, it is there.
  + 208355 [pere.noel@la] /Users/yvon/work/Ruby/Native/C/doc/Introduction_ANSI_C_html

[QUIZ][Much better solution] Pen and Paper (#90)
208300 [bulliver@ba ] charset="iso-8859-6"

[ANN] Ruby In Steel 0.75 now available for download
208306 [huw@DE TH SB] {{Version 0.75 of Ruby In Steel}} is now available for download. This

Re: [good] Re: ruby equiv of perl pos
208314 [snowzone5@ho] ROVING SWARM: http://groups.yahoo.com/group/roving_swarm/

Go to specific row and column
208315 [donsdx@gm il] I'm new to Ruby and programming and I know I'm getting a
208319 [farrel.lifso] That kind of functionality is usually provided by an external library
+ 208323 [donsdx@gm il] Farrel, thanks for the fast response.
| 208325 [cdc@cy he s.] In general this concept of external libs is the de facto and for a good
| 208441 [donsdx@gm il] I wasn't commenting on the goodness or badness.  I'd just
| + 208512 [guillaume.ma] There is curses in the standard library. So this little script should
| | 208639 [donsdx@gm il] Thanks Guillaume.  That is what I was looking for.  I'll
| + 208542 [kbloom@gm il] Curses is among the standard libraries, (loaded with require 'curses')
|   208640 [donsdx@gm il] I will, Ken, as soon as I understand what they are.  Thanks
+ 208385 [perrin@ap th] . . . or a different language, like Logo.

Re: Ruby In Steel 0.75 now available for download
208317 [snowzone5@ho] it's too bad the express version of vs wasn't supported. this would
+ 208320 [huw@DE TH SB] << it's too bad the express version of vs wasn't supported. this would
+ 208321 [jan.svitok@g] Explanation is here: http://www.sapphiresteel.com/Visual-Studio-Economics

gem install ajax_grid_generator  -->  parse error
208322 [phlipcpp@ya ] (ruby 1.8.2 here...)
208405 [gabriel@de e] ...

ruby httpd/cgi server for a directory
208326 [jim.foltz@gm] I have a set of ruby scripts I run manually from the command line. I'd
+ 208329 [khaines@en g] webrick.  It's standard with Ruby and is capable and flexible.  It's not
| 208388 [zedshaw@ze s] Yep, webrick's the way to go there.  That way no extra software is
+ 208516 [jim.foltz@gm] Thanks, fellers.
  208979 [jim.foltz@gm] Well, I can't seem to get this to work. Any suggestions?

block commenting-out
208330 [all@it ia t.] can anyone tell me how to bulk comment-out lines of code rather than
+ 208331 [shortcutter@] In short, use "=begin" and "=end".
+ 208332 [garbagecat10] =begin
+ 208333 [farrel.lifso] =begin
+ 208448 [kbloom@gm il] If you're going to take this approach (and =begin =end is probably better)
+ 208483 [gene.tani@gm] Komodo can do block commenting out, prepending "#".  Scite prepends
  + 208488 [perrin@ap th] Vim could, of course, do it via a substitution iterating over a number
  | + 208490 [chiology@gm ] If you highlight the lines you want commented out in Textmate, then
  | | 208495 [huw@DE TH SB] With Ruby In Steel you just mark a block and click a button to comment or
  | | + 208496 [alex@bl ck e] But...  but...  that requires taking your hand off the keyboard!
  | | | + 208497 [gemma.camero] Have you tried Mondrian?
  | | | + 208508 [huw@DE TH SB] Sorry, my mind must have been warped by doing too much Smalltalk programming
  | | |   208623 [perrin@ap th] . . . and to "mark a block" in preparation for this, I gather you have
  | | + 208498 [charles@ne n] Click a button? Isn't that what most people try to avoid when editing
  | + 208503 [chneukirchen] M-x comment-region
  |   208505 [dharple@ge e] Try M-; (comment-dwim).
  |   208581 [chneukirchen] I knew there was an easier way, but M-; requires using transient-mark
  |   208622 [perrin@ap th] What do "comment-region" and "comment-dwim" mean in practical terms in
  |   208629 [chneukirchen] Comment or uncomment each line in the region.
  |   208635 [perrin@ap th] Thanks.  That satisfies my curiosity.
  + 208762 [piers@om ka ] map ,# :s/^/#/<CR>

case statement not being picked up
208334 [aidy.rutter@] This is my code and I have printed out some de-bug statements. I
208347 [angus@qu va ] Check your indentation. You read a line. If you recognize it, you set

Calling non-existing methods works! (little magic??)
208336 [Ephaeton@gm ] Hoi Rubyists.
208377 [pit@ca it in] Martin, this seems to be a bug. As you guessed, there is a method lookup
208403 [ mfp@ac .o g] * eval.c (rb_clear_cache_for_undef): clear entries for included
208413 [pit@ca it in] Thanks for the info, Mauricio.

soap complex type example
208337 [francois@ba ] i've got very limited soap experience and i'm currently stuck on how to
210818 [nakahiro@sa ] Sorry for late reply.

Re: case statement not being picked up (please ignore the previous question)
208342 [aidy.rutter@] I am still struggling without a visual debugger within an IDE, even

strange dbi
208348 [jfabiani@yo ] First I'm a newbie to ruby.  I'm using SUSE 10.0, ruby 1.8.2, dbi, freetds,
208353 [gemma.camero] Johnf,
208357 [jfabiani@yo ] I tried that.

FCGI with GEM install error
208349 [skating4life] After successfully installing Ruby + Rails on windows to develop, I
261961 [syed.badsha@] This may help ......

Setting Windows Environment Variables
208352 [gemma.camero] I'm another Ruby noob and wondered if any of you can help me with my problem.
208354 [jan.svitok@g] ENV['PATH'] += "c:\ruby\bin"
+ 208361 [gemma.camero] Thanks a lot Jan.
| 208381 [jan.svitok@g] If you need to setup machine's global environment, maybe you can use
| 208491 [gemma.camero] Still thinking in Ant you see!
| 208500 [lyndon.samso] ...
| 208521 [halostatue@g] Not really. You can't change the environment of an already running
| 208528 [gemma.camero] Thanks for all that - but I think you missed the point. I need to set up the env path of the machine permanantly. Say we wanted to bring in a new build machine or the old one died/I spilled coffee on it... :s The point being that I want the environment variables on the machine, not in the shortcut/script/kernal I'm running. I have done something similar before using NSIS which worked great as lots of programs had to also be installed and programs placed in folders etc.
| 208602 [ml.chibbs@gm] You have to set entries in the Windows registry to do this
| 208607 [gthiesfeld@s] require 'win32ole'
| 208608 [Daniel.Berge] It's HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Session
+ 208364 [robert.dober] ...
  208368 [halostatue@g] => "C:\\Ruby\\bin;..."
  208374 [robert.dober] ...

[OT] Re: How do you use flock and clean up lock files?
208358 [gwtmp01@ma .] Hmm. One of the hallmarks of the Unix philosophy was/is the idea that
208362 [garbagecat10] Hmm, you were responding to me so I thought I should clarify. One of
208382 [gwtmp01@ma .] I guess it wasn't clear to me that you were responding to
208389 [garbagecat10] ...
208476 [znmeb@ce ma ] Almost unusable? How are they worse than "almost as heavy as processes?"
208487 [garbagecat10] ...

Trouble parsing against a hash
208360 [pbailey@bn .] I get the following error message from RUBY when I try to run the script
+ 208370 [james@gr yp ] Just FYI, the language is Ruby, not RUBY.  ;)
| 208519 [pbailey@bn .] Thanks, James. Sorry 'bout Ruby. I don't understand why my pound sign is
| + 208522 [halostatue@g] No. There's no such thing as a pointer to a variable in Ruby; Ruby
| | 208525 [pbailey@bn .] You mean, it's because I was simply missing quotes around my "#{}"
| | 208527 [james@gr yp ] var.to_s
| | 208545 [pbailey@bn .] OK. I'm a bit confused, though. I've been using #{var} for quite a while
| | + 208548 [gemma.camero] I thought #{var} was used within quotes to get the value as otherwise you just get var...
| | | 208552 [james@gr yp ] Correct.
| | + 208549 [james@gr yp ] As we have said, #{ .. } is only used inside double-quoted Strings.
| |   + 208553 [ara.t.howard] to clarify: you __can't__ use it anywhere else.
| |   | 208555 [gemma.camero] not *pointless* - at least it shows up in red in Modrian then!
| |   + 208570 [pbailey@bn .] Yup. That does make sense now. And, it's an eye-opener for me. Your
| + 208526 [james@gr yp ] '#{key}*'
+ 208372 [gwtmp01@ma .] File.fnmatch("#{key}*", psfile)
+ 208376 [ara.t.howard] get a good highlighting editor like vim and you'll see these errors
| + 208517 [pbailey@bn .] Wow. Thanks, unknown Guest. I didn't do your YAML thing, but, I did use
| + 208518 [pbailey@bn .] Wow. Thanks, unknown Guest. I didn't do your YAML thing, but, I did use
+ 208392 [cohen.jeff@g] Jeff
| 208400 [pbailey@bn .] Thanks, Jeff. I did find that problem already and I fixed it. I also had
| 208449 [collinsj@se ] ...
+ 208401 [jtregunna@bl] Jeremy Tregunna
  208406 [jtregunna@bl] Bah disregard, still sleepy. Sorry for the noise.

Spelunking in Ruby's Source
208366 [james@gr yp ] Ruby for Rails makes an interesting claim that object_id(), send(),
208745 [logancapaldo] Everything (almost) belongs in Kernel <g>

posting bug report for "make install-doc"?
208373 [rdm@cf l. om] While running "sudo make install-doc" on Mac OS X 10.4.7,
208402 [jan.svitok@g] either bugtracker at: http://rubyforge.org/tracker/?group_id=426 or
208409 [rdm@cf l. om] tnx

no such file to load -- stringio (LoadError) ???
208375 [rdm@cf l. om] I recently installed Ruby 1.8.4 on Mac OS X 10.4.7, following

Maybe I can ask here
208387 [sambient@gm ] Sorry, because this is Rails related but it seems not answers are
+ 208394 [jgbailey@gm ] ...
+ 208396 [james.britt@] Putting aside whether this is the right list for this question (I
+ 208465 [surfunbear@y] I found you can write ruby programs which include code in the apps

[ANN] Northern Virginia Ruby user's group meeting 8/16/06
208391 [tom@in oe he] For those in the northern Virginia/DC area, there's a Ruby user's group

Get formal parameter names of a method?
208393 [cohen.jeff@g] Is there a way to reflect on a method to get the declard names of the
+ 208397 [halostatue@g] Not in this version of Ruby. I don't know if it's planned.
+ 208398 [shortcutter@] It's not possible without access to the source code or some major
+ 208407 [rubyfan@gm i] Maybe there will be a built-in way to do this in 2.0?
| 208415 [kenosis@gm i] Its a long shot but as a nasty hack you could read the original source
| 208447 [ptkwt@ar cn ] If you're going to do that you might as well use ParseTree.
+ 208410 [rubytalk@ea ] ...
+ 208455 [gwtmp01@ma .] What is the use case for this sort of thing?  Off hand the only reason

South African Ruby Programmers
208412 [leslieviljoe] Again, I am asking that any South African Ruby programmers register at
208414 [Daniel.Berge] But, think of the job security! :-P
208416 [leslieviljoe] I know this, and have also seen evidence of it (the team of Java

Consecutive sort on Array of Hashes
208417 [fifoooo@ho m] Here my - strange - problem.
+ 208421 [james@gr yp ] Does this do what you were after?
+ 208428 [Gennady.Byst] Each of your sort's just re-arranges the array by the new criteria,
| 208475 [kbloom@gm il] Not of .sort is a stable sort. Then it will preserve the order of items
+ 208444 [r.fulton@au ] I suspect the problem is that sort does not keep the order of equal keys
+ 208494 [simon.kroege] try
  208692 [fifoooo@ho m] First thank you very much for helping me out on that one.

Ruby questions!
208419 [fabbyfabs@gm] Hey, I have some questions I hope someone can answer..
+ 208430 [TimHunter@nc] Welcome to Ruby!
| 208432 [james@gr yp ] James Edward Gray II
+ 208433 [james.britt@] James Britt
  208440 [fabbyfabs@gm] Thanks alot!

Text print y,x location?
208420 [sardaukary@y] Is it possible to output text to specific coordinates at the command
+ 208426 [phrogz@gm il] See the thread titled "Go to specific row and column" that was also
+ 208473 [m_goldberg@a] Take a look at the Curses library module. It's part of the standard