166292-196516

166080-167727 subjects 166507-167806

^ Question about begin, rescue, end.
166292 [hhausman gma] require 'open-uri'
+ 166295 [gregory.t.br] I think it's the 'retry' that's causing the error.
+ 166296 [zdennis mkte] 'rescue' by itself catches StandardError exceptions and subclasses of StandardError. The
| 166298 [gregory.t.br] irb(main):004:0> Timeout::Error.ancestors
| 166306 [hhausman gma] Very interesting.
| + 166307 [logancapaldo] begin
| | + 166310 [vjoel path.b] rescue Exception => ex
| | + 166385 [mental rydia] Can you _raise_ a non-Exception-derived class?  I don't think you
| + 166311 [gregory.t.br] No. that's just gmail.  Annoying, isn't it?
+ 166319 [bob.news gmx] A general remark: You can greatly improve reliability of your code by
  166351 [skaes gmx.ne] I'd prefer

^ Ordinal Date String to Standard Date String for a Beginner
166304 [david.a.boyd] I have an ordinal date string and I want to change it to an ordinary
166309 [toddkennethb] irb(main):001:0> require 'date'
166322 [botp delmont] davyb [mailto:david.a.boyd@gmail.com]
166326 [david.a.boyd] Botp, Todd,
+ 166327 [david.a.boyd] Yeah, it's backwards in the PS -- just noticed it. (str.reverse won't
+ 166413 [toddkennethb] Yeah, no examples.  I guess they just expect us to learn it from them
+ 166414 [w_a_x_man ya] strYear, strOrdn =  "2005/17".split("/")
| 166603 [david.a.boyd] How elegant! Thanks!
+ 166417 [toddkennethb] Oh, and strftime doesn't show up in the online RDoc documentation
  166421 [hgs dmu.ac.u] Hugh
  166440 [toddkennethb] Oops, I meant http://www.ruby-doc.org/core

^ Dealing with old types
166308 [richard.mcgr] I often have tables that refernce a sub-table that contain types.  e.g.
166383 [ef alum.mit.] < ... a Rails question ... >

^ Block Syntax Error
166312 [zhimin.wen g] Please see the following code
+ 166313 [hal9000 hype] In my personal opinion, this is one of those things that
+ 166315 [christophe.g] I wonder if it has to do with precedence rules. The different block syntaxes
+ 166316 [matz ruby-la] Since
| 166466 [hal9000 hype] OK, this makes sense. I should withdraw my previous comments then.
| 166479 [zhimin.wen g] Thanks all for the clarification and guides!
+ 166339 [dblack wobbl] See other answers.  I just want to put in a plug (since you're still a
+ 166389 [jvm_cop spam] My opinion is that you should _want_ to put a comma before the {puts
  166392 [dblack wobbl] func(foo) { puts "blk" }

^ problem after rails upgrade
166314 [jason.wold g] After upgrading rails (via gem update) I am getting a const_missing error.
166318 [jason.wold g] To answer my own question, the new version must need a newer version
166398 [steve waits.] Thanks for your message about Ruby on Rails.  I think you'll find

^ Problems installing rails
166323 [JensRie gmx.] I'm just trying to install the rails framework on my Windows XP system
166330 [sean.ohalpin] gem install rails --remote --include-dependencies
166331 [JensRie gmx.] That was my first try was (according to another tutorial)...
166399 [steve waits.] Thanks for your message about Ruby on Rails.  I think you'll find

^ London Ruby Users Group meeting - 23 Nov
166324 [rob.02004 gm] ** London Ruby Users Group Meeting **

^ problem with rio-0.3.4
166329 [wybo servaly] require 'rubygems'

^ Method Definitions
166335 [daniel.schie] Just a little curiosity: If method definitions (`def foo; end') were to
166341 [dblack wobbl] Yes; I think that's one of the main things people who advocate this
166344 [daniel.schie] Could you point me to one of those discussions? I wonder why such a
+ 166345 [dblack wobbl] Search for "make def return something useful"
| 166366 [daniel.schie] Though I can't really find a reason for `def' not to return a symbol.
| 166406 [chneukirchen] Maybe it would make "load" weird...
| 166411 [daniel.schie] I don't follow... Can you elaborate?
| 166506 [chneukirchen] Nevermind, I was wrong about the return value of Kernel#load.
+ 166368 [halostatue g] As a big proponent of making def return something useful, it was turned
  166379 [transfire gm] under 'def return struct'

^ [QUIZ] Euchre Hands (#55)
166338 [james graypr] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 166540 [ruby.brian g] I have to admit that I do not totally understand. Why is in the
| 166543 [james graypr] That's probably just my terrible explination.  Let's see if I can
| 166545 [ruby.brian g] Now I understand. I always sort my cards first by value then by suite.
+ 166631 [sgentle gmai] Hmm. My original solution was to assign integer values to each card

^ Re (OT): ruby-ldap, invalid credentials
166343 [bouncer nowh] helps me a lot with ldap.

^ ri erratum: Marshal#dump
166348 [martindemell] ri refers to Marshal#dump rather than the correct Marshal.dump (ruby

^ Problem with Daemon written in ruby...
166349 [steve_rubyta] I recently asked about daemonizing a process in ruby and, in brief, I
166372 [akr m17n.org] 1. fork doesn't copy other threads in the child process.
+ 166453 [rick nooner.] Also, if your process needs to be a daemon, that should be the first thing you
+ 166544 [steve_rubyta] Thanks.

^ Ruby IDE
166353 [Rawn027 gmai] I am running mac os x and was wondering a good IDE with at least good
+ 166357 [krisleech in] ...
+ 166358 [kashia.buch ] I'd propose TextMate, which isn't really a complete IDE, but is way
| 166364 [garth penrhi] I use TextMate too.  It has an excellent feature that lets you open a
| 166376 [Rawn027 gmai] Thank you very much for the help, I am going to check out Radrails. I
+ 166360 [gregory.t.br] I use vi/vim/gvim on OS X.3/OS X.4/Linux/Windows
+ 166362 [zdennis mkte] Radrails looks promising for rails developers, for ruby itself check out
+ 166363 [Tim.Ferrell ] I have been using Komodo 3.5 lately and am quite happy with it ... one thing
| 166384 [krisleech in] RadRails is based on Eclipse with RDT, so you can use either, depends if
| 166387 [Rawn027 gmai] has anyone used bluefish?
+ 166391 [rob.02004 gm] There's also the jEdit Ruby Editor Plugin, it has syntax highlighting,

^ foreign keys in Ruby on Rails
166356 [spambak hotm] Should the foreign key constraints only be declared in the Model code of
166373 [jvm_cop spam] Why not ask on the Rails list?
166402 [steve waits.] Thanks for your message about Ruby on Rails.  I think you'll find

^ IO.lineno= not behaving as expected
166361 [belorion gma] What am I missing here (apologies if this is just my 7am brain fog
+ 166367 [jvm_cop spam] If remember that the docn says that lineno= just changes the current
| 166371 [belorion gma] I noticed that ... but, what, exactly is that useful for? (as you already
| 166375 [ruby.brian g] It could be used if you read into a file and want to update lineno
+ 166370 [ruby.brian g] it is impossible to do a fast lookup by line without building an index

^ Re: getopt-1.3.0
166365 [djberg96 gma] Good way to jinx myself, eh?

^ ruby-snmp annoying problem :(
166377 [mj-usunto tk] Simple script (Should set Integer=1 into device)
166764 [kozlov.y gma] manager = SNMP::Manager.new(:Host => '10.20.9.53', :Version => :SNMPv1,

^ Gem error: OpenURI::HTTPError
166386 [Daniel.Berge] Ruby 1.8.2

^ Re: Ordinal Date String to Standard Date String for a Beginn
166393 [jvm_cop spam] Somewhat off-topic, but I notice that neither of you have registered.
166403 [halostatue g] Actually, it's *extremely* off-topic, as most of us do not read
166405 [gregory.t.br] I think the ruby-forum is neat but as a minor whine, I don't see why
166423 [leavengood g] I strongly agree. I would recommend removing the tagline and adding a
166434 [martindemell] OTOH there's something to be said for leaving it in place at least a
166439 [gregory.t.br] At the very least it should be an option for registered users to turn on or off.

^ [QUIZ PROPOSAL] autoreferential letter count
166395 [p.capriotti ] Write a ruby program that takes a sentence as its input an produces an
+ 166401 [mental rydia] Interesting.  This is basically equivalent to writing a function
| 166419 [james graypr] Hmm, I'm not sure that makes a great quiz then, unless we supply a
+ 166667 [ jupp gmx.de] As long as one restricts oneself to a single language that is no

^ Re: Learning Ruby Hackfest Hosted by new_haven.rb this Frida
166397 [jvm_cop spam] www.gotomeeting.com -- free to try for 30 days, IIRC.  (And worth what

^ gem install getopt problem
166407 [vjoel path.b] $ gem install getopt
+ 166408 [Daniel.Berge] That's weird.  It looks like the gem file is broken for some reason (I just
+ 166412 [jim weirichh] The lib and examples directories are not included in the gem archive itself.
  166420 [Daniel.Berge] Whoopsie.  I messed up the gemspec (fixed now).  I'll upload a new gem shortly.
  166432 [vjoel path.b] Thanks. Looking forward to trying getopt.

^ Ruby and WMI
166410 [timgerrlists] I have been playing with ruby for a few weeks now to do windows
166515 [dave burt.id] The following are semantically equivalent. Choose the prettier of the two.
166776 [timgerrlists] Dave thank you for the informaiton but I am getting some errors, "
166800 [dave burt.id] You haven't defined cpuName. If you post the script you're using, I can be
166841 [timgerrlists] Thank you, it now works, can you tell me one thing, ( I am learning)
166848 [rascal1182 g] Indexing with a range [something..-1] will go to the end of the array/string.
166931 [botp delmont] #Thank you, it now works, can you tell me one thing, ( I am learning)

^ generic, non web based templating engine?
166426 [michael.camp] Is there a generic templating engine for ruby, a la Freemarker for
+ 166427 [halostatue g] Look at the work in Ruwiki's templating engine. It's based on the RDoc
+ 166429 [james graypr] ERb is a standard Ruby library and can be used for anything (not just
+ 166444 [alex deletem] mature; stricter separation of code and template in that it doesn't involve embedding any ruby code in templates and doesn't even allow any parameter passing to loop functions. good if that's the sort of templating you want.
+ 166447 [khaines enig] You can just use erb.  It doesn't have to be used for web things, if you like
+ 166530 [sean.ohalpin] If you like erb, why not use it? ;)

^ [ANN] Reg - Ruby Extended Grammar 0.4.6
166428 [vikkous gmai] I am pleased to announce version 0.4.6 of Reg, the Ruby Extended

^ ruby's weird operators (||=)
166431 [maggelet gma] Is there an explanation somewhere of all the weird operators in ruby
+ 166435 [guslist free] a <op>= b
+ 166436 [vjoel path.b] Operators of that form are not methods or primitives. This
+ 166437 [james graypr] x OP= y
  166441 [maggelet gma] got it, that's what I figured.  Is there a list of these somewhere?
  166449 [ruby-talk wh] Here you go: http://rubygarden.org/ruby?FunnySymbolsInCode
  166893 [gene.tani gm] If you still want to Google, this is usually called augmented

^ 'fixtures'
166438 [mkhan lextra] A quick question,
166442 [dooby d10.ka] {belows => belongs}  # ?

^ Maximum read size with Net::HTTP.get?
166445 [smorabito gm] Folks,

^ [ANN] Ruby RTF 0.1.0
166446 [paw220470 ya] Ruby RTF 0.1.0

^ overriding NArray.new
166450 [fugalh gmail] class Sound < NArray
166451 [blargity gma] Never used NArray before, but try calling super() with the args you'd normally
+ 166456 [fugalh gmail] Yup, I do want to call super. My example was contrived such as to make
+ 166458 [fugalh gmail] class Sound < NArray

^ web development w/ ruby
166452 [cameron.math] I need to make some simple web-pages at work for internal use
+ 166454 [collinsj sea] The CGI class with the HTML extensions will take care of all the HTML
| 166455 [cameron.math] gee don't know how i never noticed that before... thanks!
+ 166459 [ed.howland g] I'd point out that RoR does not need a DB. You can make your own
| 166469 [cameron.math] cool, i haven't paid a whole lot of attention to rails (like i had
| + 166472 [james_b neur] You might also want to look at Nitro and IOWA
| | 166477 [itsme213 hot] That sounds like a big plus (over Rails). How does one go about doing this?
| | 166511 [george.mosch] $ gem install nitro
| + 196516 [noreply exam] Alternatively, you could just go camping. Camping is fun. :)
+ 166468 [agorilla gma] Bill Guindon (aka aGorilla)
+ 166497 [penryu veget] Coming from php, you might find eruby nice.  It uses files of
  166501 [jqshenker gm] Although eruby might familiar (and thus an ideal tool for theseparticlar tasks), I'd recommend eventually learning the basics of RoRas its MVC architecture encourages better style than PHP does most ofthe time. It doesn't need a database, and while ActiveRecord (its ORM)is a big part of Rails, its use is by no means mandatory. And in timeyou'll probably need to use its other abilities (such as sendingemails or providing web services).

^ Symbol#inspect bug?
166457 [dbatml gmx.d] Symbol#inspect should return a valid symbol literal, right?
+ 166460 [eric.mahurin] p(:'=')
+ 166464 [drbrain segm] $ ri Object#inspect
| 166467 [dbatml gmx.d] $ ri Symbol#inspect
| 166471 [drbrain segm] I consider Object#inspect to set the intent of all the #inspect
| 166480 [eric.mahurin] For many of the other core classes (and definitely all other immediate
| + 166481 [leavengood g] 32.upto(126) do |i|
| + 166495 [bob.news gmx] Although I'd agree that Symbol#inspect can be improved and should be
|   166525 [eric.mahurin] I didn't say all core classes return something evalable for #inspect
|   166532 [discordantus] Still, I like that for most cases in core classes, #inspect yields aneval-able value. This makes it a lot nicer for learning Ruby in IRB.
|   166536 [eric.mahurin] It's annoying that these aren't constants.
|   166541 [hal9000 hype] #inspect is for human-readable strings. If they happen
+ 166496 [matz ruby-la] Which version are you using?
  166520 [eric.mahurin] Thanks matz.  I just downloaded 1.8.4 preview1 and tried this out.  It
  + 166529 [florgro gmai] Well, at least in 1.8.2 they can handle empty strings, but it is
  + 166618 [nobu.nokada ] Thank you, fixed it now.

^ 10.to_hex?
166474 [uval rz.uni-] I can't find the function to convert an number to its hex representation
+ 166475 [marcel verni] ri sprintf
+ 166476 [tobias.luetk] 10.to_s(16) #=> a
+ 166478 [ara.t.howard] This message is in MIME format.  The first part should be readable text,

^ Nitro / rayman
166482 [itsme213 hot] That tutorial is soooooo useful ... just a feeeew more pages would round it

^ sqlite with nitro
166484 [itsme213 hot] I successfully installed the latest gem sqlite3-ruby (with the DLL on the
+ 166578 [jeff.darklig] When I installed, I put the sqlite files into <windir>/system32
+ 166607 [george.mosch] dunno, I am using sqlite3 + windows all the time with no problems...

^ Ruby/SDL for Mac OS X
166487 [duane.johnso] For anyone interested in running Ruby/SDL on Mac OS X, I have a walk-

^ Best OS for Ruby Dev/Best OS for Ruby Hosting
166489 [Rawn027 gmai] Which is the best OS to use for ruby development...My vote goes to Mac
+ 166491 [interfecus g] Ruby is, I believe, primarily designed for use with Linux, although the
+ 166493 [ mfp acm.org] matz uses Debian ;-)
| 166498 [jqshenker gm] Lots of people happen to like FreeBSD for its Ruby support. One of itsmajor system utilities, portupgrade, is written in Ruby, so that's oneneat aspect. I'd recommend staying away from Gentoo: I prefersource-based OSs, but Gentoo just breaks too often for it to be worthit. Also, Gentoo users are on the whole jerkyer and less helpful thannormal people. FreeBSD gives you the exact same control, with muchmore stability at the expense of a bit of user-friendiness. If youknow what you're doing, it's a really productive environment thatwon't break unless you do something stupid. I like it ;-)
| + 166505 [edder tkwspi] I can't help to defend gentoo here a bit. I've been using gentoo for two
| | + 166509 [jqshenker gm] That's perfectly ok!
| | + 166517 [caleb aei-te] Thanks.  As a Gentoo maintainer for Ruby, I'll chime in and say that
| |   166519 [Rawn027 gmai] Calab, I would like to comment on that I have been fussing around with
| |   166524 [caleb aei-te] For development, I run a minimal KDE desktop and use the Kate text
| |   166528 [mercan01 gma] I've personally grown comfortable with using Windows as a development
| + 166556 [gregory.t.br] to be worth
| + 166745 [akulbe gmail] (I'd like to start out by apologizing first, gentlemen.  this iscertainly off-topic, but needs to be said)
|   + 166748 [jeff.darklig] Also, remember that there are still a large number of us *ix users
|   | + 166749 [jeff.darklig] Oh, and as far as gentoo vs debian vs blah blah blah ...
|   | + 166753 [jqshenker gm] I do too, actually, in certain circumstances. The nice thing I likeabout Ports/Portage is it *almost is* compiling from scratch, justedit the Makefile/ebuild to change how it builds. The reason I prefernot to roll-my-own is... I forget to upgrade. Yeah, it's bad of me,but I just can't help but like to "emerge -uD --newuse world" or"portupgrade -a" every couple days and be up-to-date a couple minuteslater I've always hated binary packages (rpms especially).Debian/Ubuntu's system isn't bad for a simple, no-muss-no-fussdevelopment box, I've found recently.
|   + 166751 [jqshenker gm] (Another apology for this off-topic message, but I think that you willagree with me that it is prudent to respond.)
+ 166499 [penryu veget] I have a great time developing Ruby on both OS X and FreeBSD.
| + 166500 [matthew.hivn] The only problem I've run into so far on OS X is (and it could be my
| | + 166522 [chneukirchen] I recommend iTerm.
| | + 166526 [hramrach gma] What problems does Terminal.app cause?I connect to screen with several curses applications from OS X,NetBSD, and GNU/Linux, and I did not notice any problem specific toTerminal.app.
| + 166513 [halostatue g] Which OS do you find best for development? That will give you your
|   166546 [rick nooner.] I think this is the best answer that I've seen.  I use Ruby on Mac OS X,
+ 166590 [zdennis mkte] I've coded for ruby on Windows 2000, XP, Debian, Ubuntu and OSX. For generic ruby code not specified
| 166670 [pesterhazy g] Ubuntu combines Debian's wealth of packages with a higher degree of ease
+ 166614 [anibalrojas ] Most of my experience is based on Rails development, I develop under

^ Ruby/RoR - Lucene integration question ??
166490 [phukan_ruban] I've an application which is built with RoR and a search index in Lucene. I need to be able to integrate Lucene into the RoR app. What is the best way to do so ?
166492 [ mfp acm.org] rjni is dead.
166494 [nshb inimit.] Just actually read a bit about Lucene after your post, and found that there
166533 [iamkris gmai] I am to embark on a similar project. Just started reading on it. Isn't
+ 166534 [f andreas-s.] As I have understood it, Ferret is a full port of Lucene, so you should
+ 166581 [dbalmain.ml ] Andreas is correct in stating that Ferret can read the index from Ruby.

^ why is my array a hash?
166502 [michelle cor] I have a chunk of code, where I define an array, and the very next time
166503 [penryu veget] Ruby doesn't think step is a hash.
166504 [michelle cor] Thanks, now if I could only teach Vim to match do,end pairs the way
threads.html
top