89160-124332

88968-93974 subjects 89340-142640

TEA
89160 [ralph.mason@] It's been a couple of years since I posted here so hello to old
89163 [hal9000@hy e] - the RAA (raa.ruby-lang.org)
89169 [gsinclair@so] org
89170 [hal9000@hy e] Fortunately both of these seem to be redirects.

Dir.chdir '~'
89162 [vjoel@PA H. ] Does anyone know why this happens?
89164 [theaney@ca l] You must be starting out in a directory with a ~ subdirectory that
+ 89165 [markjreed@ma] More to the point, I think is that Ruby doesn't expand ~ the way
| 89168 [vjoel@PA H. ] Ok. I guess I have to expand_path if I want that behavior.
+ 89167 [vjoel@PA H. ] Yep, that was it. Thanks!

Execute code on descendant class init
89171 [chrismo@cl b] class Main
89172 [gfb@to es ft] class Root
89175 [chrismo@cl b] Perfect! Thx.
89303 [bob.news@gm ] "Chris Morris" <chrismo@clabs.org> schrieb im Newsbeitrag
89337 [chrismo@cl b] In my example, the subclasses descend from Root, not Main.
89364 [bob.news@gm ] "Chris Morris" <chrismo@clabs.org> schrieb im Newsbeitrag
89377 [chrismo@cl b] Ah, interesting ... I'll have to look that over (my brain is away from

Include path?
89173 [eurleif@ec i] Sorry for the newbie question, but is there an enviornment variable or
89176 [gfb@to es ft] Try environment variable RUBYLIB, it adds directories to $: (it works

DRb question
89174 [jos@ca no k.] I am trying to write a simple remote execution framework, and am running into a
+ 89196 [sdate@ev re ] into a
| 89250 [jos@ca no k.] Btw, this is with ruby-1.8.1 and dRuby 2.0.4 on a recent FreeBSD -current,
+ 89286 [jos@ca no k.] Never mind, I found the problem in my code triggering this error after
  89349 [sdate@ev re ] above
  89358 [jos@ca no k.] I just updated the code on the website. This is far from complete though, it
  89415 [sdate@ev re ] Thanks ! Where can I find apollo.rb ?
  89421 [jos@ca no k.] Actually, you'll want common.rb, I just put it up.

nuby question: f.rename(x,y) does not work
89180 [bxs@ha ik .d] somehow File.rename does not work in the little script i pasted below,
89181 [decoux@mo lo] this is a singleton method
89182 [bxs@ha ik .d] OK, so what do I do now ?
89183 [decoux@mo lo] Just do like in [ruby-talk:89181] use File.rename
89184 [bxs@ha ik .d] Ah, OK,

Ruby explained to Python programmers
89185 [glenfant-nos] I googled for a "ruby presentation for python programmers" (like me :-) but
+ 89186 [hal9000@hy e] I think there is something like this on rubygarden.org -- sorry I can't
| + 89187 [hal9000@hy e] Umm, there is also an appendix in _The Ruby Way_. :)
| | 89217 [lists@za a. ] I find the said document very helpful, as well as the "From Perl To
| | 89240 [hal9000@hy e] Yes, much of it is out of date. This book was started late in 2000,
| | 89248 [sdate@ev re ] Is this true in general or you talking of some specific publisher here?
| | + 89249 [gsinclair@so] [Shanko:]
| | + 89251 [lists@za a. ] Yes, I'm also surprised that O'Reilly hasn't put out more Ruby titles.
| + 89188 [surrender_it] Btw, I suppose that page mostly shows how to do stuff in ruby that you
+ 89191 [jbritt@ru y-] Starting with Ruby? Visit www.ruby-doc.org
+ 89218 [greg@pu o. j] Greg McIntyre ======[ greg@puyo.cjb.net ]===[ http://puyo.cjb.net ]===

Best way to send mail in ruby
89189 [rb@ra hi ou ] I have to send a mail from a Ruby script, and wonder what's the best way
+ 89195 [behrends@cs ] Assuming that you have sendmail/exim/postfix or something else with
+ 89209 [culley@fa tm] def mail(body, headers)
+ 89232 [rodrigo.berm] require 'net/smtp'
+ 124330 [martin.anker] Is there a possibility to send a mail to a server that allows only
  124332 [transami@ru ] Sounds like it would be a nice addition to Net::SMTP.

successive chroots thanks to continuations?
89192 [rb@ra hi ou ] I have defined several chrooted environments on my computer.
+ 89215 [drbrain@se m] The command above uses chroot(8) to run the command in a subshell.
+ 89221 [decoux@mo lo] chroot(1) is an user command
  89234 [rb@ra hi ou ] yes. Take this as what I want to duplicate in "pure" Ruby.

Simple Ruby DB apps/programs ...
89193 [usenets@ya o] I was wondering if there are some example of small Ruby(1.8.1) Database
+ 89200 [usenet@an re] You should take a look at http://lafcadio.rubyforge.org/. I didn't try
+ 89208 [surrender_it] I think there are samples in <insert your favorite dbms> libraries,
+ 89212 [carl@yo ng l] My favorite DBMS for small client apps is sqlite.  No other DB comes
  89284 [usenets@ya o] Thanks to all.
  89289 [ahoward@ng c] ~/eg/ruby > cat photo.rb
  89298 [usenets@ya o] Thanks Ara, I'll definitely will try your example above. And check out
  + 89299 [matt@li ke .] pstore.rb uses File.flock to lock the pstore database.  This works if
  | 89316 [usenets@ya o] Thanks and please forgive my lack of knowledge of pstore.
  | 89320 [matt@li ke .] Yes.
  | + 89379 [usenets@ya o] Thanks.
  | + 89619 [vjoel@PA H. ] select a directory to be your "database", and FSDB gives you a db object
  + 89321 [ahoward@ng c] i have used it for multi-user in house applications.  i seem to remember you
    89380 [usenets@ya o] Thanks Ara.

Rublog questions
89194 [hal9000@hy e] I probably "just don't get it" yet. So feel free to say,
+ 89199 [chrismo@cl b] You don't want to do that.
| 89210 [chrismo@cl b] I meant to smiley face that -- it was funny (most assuredly only to me)
+ 89202 [dave@pr gp o] You clearly want to do that.
+ 89216 [careck@ci cl] Hal, I'm with you.
  89226 [dave@pr gp o] Rublog also has a (currently commented out) feature called filters,

Problems Extending DateTime
89197 [matt@di it l] Howdy,

classes repository? (was : Best way to send mail in ruby)
89198 [rb@ra hi ou ] Thanks :-)
89201 [austin@ha os] A lot of these things are snippets on the RubyGarden Wiki, and there is also
89219 [rb@ra hi ou ] The snippets section on rubyforge is cool, but is not that rich in
89389 [tom@in oe he] Yours,
89393 [rodrigo.berm] PLEAC [1] (Programming Language Examples Alike Cookbook), is an effort

More from using DRb and observers...
89205 [Stephan.Kaem] Andre, thanks for the link to the earlier discussion.
+ 89213 [drbrain@se m] ut?
+ 89253 [Stephan.Kaem] thanks for your answer.

How to disconnect a drb client?
89206 [nathaniel@ta] I have a drb client/server application, and I'd like the server to be
89416 [sdate@ev re ] I was trying hard to come up with a solution which did not involve modifying
89432 [cc1@ce .w st] If you do a callback so both the client and the server have a connection to
89441 [nathaniel@ta] What I ended up doing was just having the server invalidate the front

#@ and #$ (Was: Re: DRb question)
89214 [drbrain@se m] #@varname and #$globalname get expanded to #{@varname} and

multithreading with an external library
89220 [lists@za a. ] I plan to use Ruby/DL with Firebird 1.5's "embedded server" DLL on
89259 [pbrannan@at ] One way to solve this is to have a layer that transfers messages to and

webhosting with ruby?
89222 [cpine@he lo ] Does anyone know of any webhosters offering Ruby (or mod_ruby)?
+ 89223 [jbritt@ru y-] James Britt
| 89243 [billk@ct .c ] I just added http://www.cybersalad.net to the wiki page.
+ 89227 [michael_s_ca] rootr.net is one.
| 89228 [aredridel@nb] I do. http://theinternetco.net/
+ 89242 [gfb@to es ft] I came across http://www.1and1.com the other day, they offer free web
+ 89244 [sdate@ev re ] I can strongly recommend  totalweb-inc.com

When did IO::read appear?
89229 [W.L.Kleb@La ] IO.read, but when I moved it to a ruby 1.6.8 (2002-12-24)
+ 89230 [dave@pr gp o] content = File.open(name) { |f| f.read}
+ 89231 [decoux@mo lo] redefine it, something like (not tested)

[Win32] how to set a system-tray-icon with ruby?
89236 [torsten@pi e] i am using ruby-1.8.0 on win32 with fxruby and tk. (installed with the
89256 [emmanuel.tou] also, wxwindows supports system tray stuff (but i only ever looked at

Method to Proc
89237 [GGarramuno@a] Is there a way to turn a method into a proc stored in a variable?
+ 89238 [jgb3@em il b] t = method( :myfunc )
+ 89239 [surrender_it] irb(main):001:0> def f; puts 'ciao' ; end

$Kills IRB
89252 [ralph.mason@] I noticed that

PGConnGroup not available
89254 [han.holl@po ] I would like to have a look at Ara Howard's PGConnGroup, but the server
89263 [ahoward@ng c] i can get this to you offline.  i don't have web space for my code at the
89305 [han.holl@po ] Thanks for the archive.

libldap-ruby and \000
89255 [bsanyi@su se] ...
+ 89258 [ttate@tt ky ] Could you try the following code?
| 89260 [bsanyi@su se] Thank You, this works.  But I think hashes are more distinct
+ 90175 [bsanyi@su se] the same probleme occures with gq-0.5.0-1 on Debian/woody.

class Time doesn't pass year 2038?
89261 [temuphaey0@j] Is there another class to process dates after 2038? (and before 1970)
+ 89262 [temuphaey0@j] Sorry.
+ 89338 [ jupp@gm .d ] Just to point that out: We are very close to the middle of epoch
  89341 [markjreed@ma] ...
  + 89344 [sdate@ev re ] Please allow my ignorance: what is this all about? I thought epoch was just
  | + 89347 [markjreed@ma] Technically, an epoch is a point from which time is
  | + 89350 [hal9000@hy e] In general that is true. :)
  |   + 89351 [hal9000@hy e] Sorry to reply to myself. Of course, a billion ~= 2**30
  |   + 89352 [markjreed@ma] A 32-bit integer can hold 2**32 = 4,294,967,296 values.  In
  + 89392 [dcarrera@ma ] Could someone tell me an elegant way to figure that out?
    + 89395 [dcarrera@ma ] Sorry to reply to my own post, but by trial and error I think I found it.
    | 89405 [markjreed@ma] Right.
    | 89406 [dcarrera@ma ] I do love Ruby.  =)
    + 89398 [steven.jenki] For most purposes, yes. UTC is an acronym that equally mis-matches the
    + 89399 [mike@ra do .] Appologies for non-ruby content

Consider RubyForge (Was: PGConnGroup not available)
89264 [James.Weiric] I would encourage anyone who has public code to share to consider a

Basic Syntax for Extending Instances
89265 [mlipper@US A] Hey everybody,
+ 89267 [austin@ha os] class Date
+ 89268 [jgb3@em il b] Well, it looks like the problem is that @date_precision is an "instance
  89269 [mlipper@US A] Thank you!
  89270 [mlipper@US A] Thanks!

readlines changed from 1.8.0 to 1.8.1?
89266 [vjoel@PA H. ] $ cat >foo
89282 [matt@li ke .] It is a bug that'll be fixed in future 1.8.x releases (at least, it is

name of current ruby iterpreter
89271 [vjoel@PA H. ] How can I find the name of the current ruby interpreter? It's not $0,
+ 89272 [thomas_adam1] exec $(which ruby) name_of_script.rb
| 89273 [vjoel@PA H. ] 1. It has to work on windows, too.
+ 89274 [rpav@me hl .] require 'rbconfig'
  89275 [vjoel@PA H. ] Almost there. It won't work if you've got 1.8.0 and 1.8.1 both installed
  89278 [rpav@me hl .] Maybe installing one over the other... that's not a good thing.  I
  89280 [vjoel@PA H. ] Good idea...I've been meaning to lear encap or stow. But your suggestion

Kernel::VERSION
89276 [unet@re x. o] There used to be a constant of this name, which I was using
+ 89277 [lyle@us rs s] ...
+ 89279 [rpav@me hl .] $ irb
+ 89283 [matt@li ke .] RUBY_VERSION works too.
  89325 [unet@re x. o] Thanks.  RUBY_VERSION looks good and works as early

Re: =?ISO-8859-15?Q?$=A3?= Kills IRB
89281 [ jupp@gm .d ] I don't think that it is a real answer but it is because irb aborts

proc question and instance_methods
89285 [GGarramuno@a] Continuing with the sets of newbie questions...
89287 [jgb3@em il b] If you pass the code to eval, you can then test for a SyntaxError
89306 [rasputnik@he] But that would execute the code, wouldn't it?
89308 [bob.news@gm ] "Rasputin" <rasputnik@hellooperator.net> schrieb im Newsbeitrag
89319 [jgb3@em il b] Hey, that's clever.  I'll have to remember that trick. :)
89326 [vjoel@PA H. ] Except, if you're paranoid...
89331 [nobu.nokada@] See valid_syntax? in sample/test.rb or test/ruby/test_system.rb.

Problems getting Apache 2.0.43 and erb to work
89288 [jlsysinc@al ] I'm running Apache 2.0.43 on Windows XP and trying to setup erb (eruby?).
92676 [jlsysinc@al ] FWIW, In case others are having this problem, I finally got erb to work.

Calling shadowed methods in an inherited object
89290 [cc1@ce .w st] class A
+ 89291 [david.naseby] class A
+ 89292 [jgb3@em il b] def bar
  89297 [cc1@ce .w st] snip
  + 89302 [daniel.doel@] class SuperProxy
  + 89304 [bob.news@gm ] "Charles Comstock" <cc1@cec.wustl.edu> schrieb im Newsbeitrag

Loading a script in the top-level namespace?
89293 [NoSpam@No pa] What is the correct way to load a Ruby script into the
89295 [ptkwt@ar cn ] load should do what you want.

problems compiling ruby 1.8.1 on AIX 4.3.3
89294 [biblia99@ya ] /usr/ccs/bin/ld -brtl -eInit_rmd160 -bI:/home/paul/ruby-1.8.1/ruby.imp -bM:SRE
89296 [nobu.nokada@] Have you installed required stuff (libraries etc.) properly?

Ruby.exe crashing with WIN32OLE WMI example?
89300 [yonatan_avra] I'm trying to do some WMI stuff with Ruby.  I found this simple
89301 [botp@de mo t] I cannot solve it but I can compare it w mine.
89315 [yonatan_avra] Regarding Botp's configuration using Windows XP...
+ 89324 [mikkelfj-ant] "yonatan" <yonatan_avraham@hotmail.com> skrev i en meddelelse
+ 89327 [chrismo@cl b] No, but FWIW, I've seen this very thing myself -- so at least you know
  89346 [botp@de mo t] te-phil.com>...
  89360 [yonatan_avra] Botp,

plruby in PG distribution
89307 [lists@za a. ] I am wondering why plruby has not been included with the PostgreSQL
+ 89309 [samuel.kvarn] Well, I don't know why it isn't included in the standard PG
| 89311 [decoux@mo lo] If you have a problem with plruby, it's best to contact me in *private*
+ 89310 [decoux@mo lo] to respond to this question, you must first respond to

rub 1.8.1 and $=
89312 [clr1.10.rand] def Myclass
89314 [bob.news@gm ] "Patrick Gundlach" <clr1.10.randomuser@spamgourmet.com> schrieb im
89317 [clr1.10.rand] Oh, that's new in 1.8.0. I'll read the news section more carefully
+ 89318 [matz@ru y- a] FYI, this also work
+ 89363 [bob.news@gm ] "Patrick Gundlach" <clr1.10.randomuser@spamgourmet.com> schrieb im

CGI
89313 [martin.morgo] I'm setting a cookie using CGi::Cookie.new and cgi.out ( "cookie" =>

Ruby and QT/KDE
89322 [greg@br nd .] Is there any mature bindings (like Python has) for KDE/QT and Ruby?
89328 [rb@ra hi ou ] The best candidate is the package Richard DAle is working on.
+ 89329 [ruby-lists@l] prerelease available at http://ww.lypanov.net/bindings.html if
+ 89383 [Richard_Dale] Sadly too late for KDE 3.2 as it wasn't included in the release plan 3
  89385 [lypanov@kd .] as bindings are not entirely simple distribution-wise in any case
  89388 [Richard_Dale] That's really good news Alex! If we can only sort out the pthreads/crash and
  89403 [ruby-lists@l] i've got a few evil ideas for this that i'll work on tonight...
  89413 [ruby-lists@l] (whenever it actually syncs with main cvs...)

Re: problems compiling ruby 1.8.1 on AIX 4.3.3 AND 5.1
89323 [Paul.Sue@te ] # configure
89357 [nobu.nokada@] I'm not sure what you need to use pthread on AIX.

more --enable-pthread "problems" [Was Re: Ruby and QT/KDE]
89330 [ruby-lists@l] unforunately after a bit of investigation

File checks....
89332 [GGarramuno@a] Is there anything in Ruby similar to Perl's if -r, -x, etc. switches?
+ 89333 [thelenm@cs u] You can use the FileTest methods, e.g.
+ 89334 [vjoel@PA H. ] irb(main):001:0> test ?r, "."
+ 89335 [gfb@to es ft] Check out methods of module FileTest p FileTest.methods). Class File
+ 89336 [gsinclair@so] www.ruby-doc.org

Compression (besides Huffman) and Ruby
89339 [ jupp@gm .d ] I don't want to start a lenghty thread about wether that makes sense
+ 89343 [wjl@ic ca er] charset="utf-8"
| 89419 [ jupp@gm .d ] Wasn't aware that 1.8 has zlib binding. watashi wa baka desu :->
| 89420 [vjoel@PA H. ] Not if you know how to say that ;)
+ 89345 [jgb3@em il b] I've played with the idea of implementing zlib in  pure Ruby...
| 89348 [markjreed@ma] I've got the bare bones of a Ruby implementation of adaptive arithmetic
| 89356 [jgb3@em il b] Heh. :)  Well, the point of doing it in Ruby isn't to win races, I
| + 89365 [bob.news@gm ] "Jamis Buck" <jgb3@email.byu.edu> schrieb im Newsbeitrag
| | 89371 [jgb3@em il b] Very true.  Generally, C *is* portable, and in general, such things
| | + 89372 [bob.news@gm ] "Jamis Buck" <jgb3@email.byu.edu> schrieb im Newsbeitrag
| | + 89375 [ jimm@io co ] A good point. That's what some Smalltalks do, but in an even more useful
| + 89366 [Ephaeton@gm ] This doesn't make any sense. When it's possible to have a ansi c compliant
+ 89381 [austin@ha os] the PragProg distribution for Windows, zlib is also present.
  89394 [jgb3@em il b] Thanks.  It is true, that with 1.8.x and zlib, there shouldn't be a real
threads.html
top