299222-323109

298991-378241 subjects 299426-340813

Extract date from filenames using regex
299222 [clement.ow@a] When my file name is in the format, 20080331 for example, the script
+ 299228 [dan@da fi ni] You can use File.mtime(file_name) which will return a Time object.
| 299239 [clement.ow@a] Thanks Daniel for your input. I tried using /\d+/ but it'll extract
| + 299244 [jgabrielygal] 1604-20-08 which is obviously an invalid date (month > 12).
| | 299247 [jgabrielygal] he month
| | 299251 [clement.ow@a] First of all thanks for your help!
| | 299252 [jgabrielygal] Can you post the smallest example that fails? Do you have files with
| | 299255 [clement.ow@a] delete_date = DateTime.now - delete
| | 299259 [jgabrielygal] Yes, that's exactly the issue.
| | 299266 [clement.ow@a] Hey Jesus,
| + 299245 [bbxx789_05ss] require 'date'
|   299249 [jgabrielygal] You are right, I overlooked the fact that he had added more parens
+ 299242 [jgabrielygal] irb(main):001:0> regexp = Regexp.compile(/(\d{4}\d{2}\d{2})/)

Zlib::GzipWriter - same code - different OS - different result.
299223 [tu2Bgone@gm ] I have ruby-1.8.6.114-1.fc7 and archive-tar-minitar (0.5.2).
299230 [drbrain@se m] open destination, 'wb' do |io|
299237 [tu2Bgone@gm ] thank you that works.

[ANN] dramatis actor library prerelease
299225 [smparkes@sm ] A prerelease of dramatis has gone up on http:://dramatis.mischance.net.

Having Trouble with ADTs
299226 [dagleytw@ab ] I'm looking for a list of Abstract Data Types and primitive data types
299227 [dagleytw@ab ] I'm also looking for a little info on Ruby's error handling abilities.
299235 [shortcutter@] Kind regards

Ruby -- Mack Framework
299236 [jazzezravi@g] Mack is a framework using ruby.  I followed this link to work with this
+ 299260 [fox@ns l. su] Does the system have sqlite3 installed?
+ 299591 [markykang-ru] Raveendran you can also use MySQL or PostgreSQL. They're both supported
+ 299605 [vidar.hoksta] This looks like the do_sqlite3 gem depends on the "uname" command to
  299638 [luislavena@g] There's work being done for fixing DO and get proper Windows support.
  299686 [jazzezravi@g] I am waiting for the new release of data mapper gem..
  299722 [markykang-ru] it over SQLite3, definitely. SQLite3 is great for getting started and

how to format json string
299238 [smellcode@gm] ...
299243 [smellcode@gm] ...

Re: Barby 0.1 - Ruby barcode generator that doesn't suck (that much)
299248 [toredarell@g] Hm, it's a while now since I uploaded it to RF, so it should work.
299328 [ivmafo@gm il] Does it work with PDF ??? how ??
299641 [ivmafo@gm il] Please somebody can help me , I'm new with ruby , can anybdy tell me
305025 [ramon.cahenz] It's not the only way, but if you're using Ruby FPDF, I've written a
307961 [toredarell@g] require 'barby'
323109 [kevin.marsh@] ...

RedCloth trims
299250 [victor.bryle] Double spaces and double line breakes are usually disabled in the

Is possible to extend "attr_accessor" "attribue=" method?
299254 [ibc@al ax ne] modified it should be executed more code than just an assignament.
299274 [transfire@gm] def self.attr_accessor(name)
299286 [ibc@al ax ne] It's really cool !!!!
299287 [ibc@al ax ne] Done :)
299303 [transfire@gm] r)

log4r housekeeping
299261 [col.wilson.e] Can I get log4r to change te log filename each day so that it is more
+ 299293 [tim.pease@gm] I do believe log4r has a rolling file appender that will perform date/
+ 300720 [ahund@io os ] of course you can. Pls use the outputter DateFileOutputter.

Building Ruby 1.9 on Windows
299267 [ nop@li t. u] I've just built ruby 1.9 for win32 including Tk 8.5. Everything passed
299271 [micathom@gm ] Maybe RUBYOPT is still set to -rubygems from a previous install.
299275 [ nop@li t. u] Thank you for your idea, it helped me to find out that there was wrong

HTTP::Post - HTTP::Get (Can someone help me?)
299273 [nospam@gm il] I'm lost.
299318 [bulliver@ba ] 'GET' and 'POST' are two 'request methods' which are part of the HTTP spec.
299387 [nospam@gm il] Thanx Darren for the info
+ 299389 [bbxx789_05ss] What's in step 1's resp.body?  Is it html?  Do you want to extract a url
+ 299407 [nospam@gm il] resp.body is a php page => purpose is to see of step 1 is working
  299408 [nospam@gm il] The First step is to insert javascript into PHP page.
  + 299434 [avdi@av i. r] What status code is the second request returning?
  | 299437 [nospam@gm il] Do you mean what he returns when i puts res.body?
  | 299449 [avdi@av i. r] I mean the HTTP status code - e.g. 302, 200, 404, etc.  What is the
  | 299467 [nospam@gm il] puts "#{res.code} #{res.message}\n"
  + 299499 [bbxx789_05ss] Of course that doesn't make any sense.
    299501 [nospam@gm il] Do you mean, that there can not be an submit button on a php page?
    299553 [bbxx789_05ss] Here's the deal.  You can make requests to urls.   Then a response will
    299560 [nospam@gm il] Thanks for explanation
    299565 [bbxx789_05ss] This is the way a submit works.  The submit button is part of a form.
    299573 [nospam@gm il] Thanks again for clarification
    299645 [bbxx789_05ss] Since you refuse to post any details, like the html and the url, how do
    299647 [nospam@gm il] Can i email you the details?

PickAxe - Understanding [] on SongList
299276 [mohnish82@re] I am a newbie and am following Programming Ruby 2nd edition. On page 44,
299280 [marcelo.maga] That's Ruby syntax sugar.  When you define a method called "[]" which
299282 [mohnish82@re] Thanks Marcelo,
299284 [rmagick@gm i] Look for "Element Reference Operator" in the book. In the 2nd Edition
299290 [mohnish82@re] Thanks Tim.

Net::FTP problem with localhost
299281 [infusiastic@] Good day all!
299295 [gthiesfeld@g] Look at the connect method.
299297 [infusiastic@] Thank you very much, Gordon.

Need help with wsdl2ruby
299294 [tad.bochan@b] I have created ruby scripts using wsdl2ruby.rb (v1.5.8) from the Betfair

Shoes and require
299299 [adler24@gm .] Helo
299301 [Gennady.Byst] Apparently, your current directory is not the same as where your files are =
299310 [pbrannan@at ] require 'require_relative'
299386 [adler24@gm .] __FILE__ #=> (eval)
299611 [why@ru y- an] Try the more recent 0.r532 builds.  Not only should require work,
299673 [adler24@gm .] Thank you for the Tipp

STDIN
299300 [chinnakarupp] I was trying to use the STDIN.read in the IRB .This keep eating what
299304 [adam.shelly@] the read method without any arguments will read until the end of file. For stdin

Ruby WATIR
299302 [evhjim@ya oo] I am a local resource manager, and I am trying to understand a
+ 299305 [kyleaschmitt] I'm not for hire (Linux sysadmin now), but I've got experience as a
| + 299307 [evhjim@ya oo] Thank you very much, that is very helpful. I have clearly been looking
| + 299308 [evhjim@ya oo] Are there any other testing applications associated with Ruby?
+ 299309 [peter@ru yr ] Did you try the watir mailing list?
  299312 [evhjim@ya oo] Actually, I was not aware of a Watir user group, but I will definately
  299372 [jazzezravi@g] I am a Tester from RF. Ruby has such gems to test the web applications.

Newbie question -how do I add values to a result?
299317 [cschall@ya o] I know that I'm missing something simple here, but the solution is

Installing tk after the fact?
299321 [kyleaschmitt] Is it even possible to install tk support after the fact for ruby 1.8?
+ 299323 [kyleaschmitt] email["both "]=""
+ 299337 [albertschlef] My Ubuntu's ruby, too, didn't come installed with ruby-tk. I used my
  299343 [kyleaschmitt] did indeed show ruby-tcltk.i386

Re: Any reason for having no module exclusion functionality
299322 [yrashk@gm il] I'd be happy to ??? but I can't subscribe to ruby-core, neither by email
299330 [pit.capitain] Yurii, if you don't mind I could forward it to ruby-core.
299336 [yrashk@gm il] Pit, it would be great! Just be sure to mention
299421 [djberg96@gm ] Regards,

$LOADPATH
299324 [chinnakarupp] I am using irb and when ever i open IRB session I have to update my
299325 [vjoel@pa h. ] The env var is RUBYLIB, the global is $LOAD_PATH or $:.
299327 [chinnakarupp] Works .Saved some time for me! Thank you

[ADV] Announcing the beta of Agile Web Development with Rails, Third Edition
299338 [dave@pr gp o] ...

irb's readline history
299339 [albertschlef] irb is nice, because is uses readline. I can press <key-up> to bring to
+ 299340 [albertschlef] I meant: "if I exit". Not "if I exist". Sorry about the spam.
+ 299342 [avdi@av i. r] Yes.
+ 299345 [vjoel@pa h. ] IRB.conf[:SAVE_HISTORY] = 100

Compression
299341 [rgowka1@gm i] How do I compress a string in ruby?
299352 [justincollin] require "zlib"

String#chop chops last byte, not char
299346 [ebelin.ebiz@] % ruby --version
+ 299347 [kbloom@gm il] Ruby 1.8 does not have multi-byte character support built in, so it
+ 299348 [charles.nutt] In Ruby 1.8.6, character == byte basically everywhere. You'll need to

REXML cannot handle apostrophes?
299353 [philip.broco] I have this line in my XML file that was created by REXML
+ 299354 [ABilyk@ma is] I believe this is not valid XML. You'd need to covert single ' to "
| + 299356 [philip.broco] doc.root.elements["tv_show[@name=\"#{s}\"]/episode[@name=\"#{n}\"]"]
| + 299385 [james.britt@] Not true at all.  Attributes may use single or double quotes; you need
+ 299461 [kbloom@gm il] This has been discussed at
| 299528 [kbloom@gm il] I spoke too soon. I found it, thought it's just a little short of being
+ 299509 [shortcutter@] irb(main):003:0> s="<episode name='03x08 - Future&apos;s End ~ 1'

Best GNU Emacs for Ruby on Mac OSX
299355 [lojicdotcom@] I'm extremely pleased with GNU Emacs 23.0.60.2 running on Ubuntu
299370 [dev-null@pm ] If you're not looking to compile from source, I'd recommend the Cocoa
299369 [dev-null@pm ] Darn, I posted before I was ready :(

Dud require for Plist gem.
299357 [adam_penny@h] I'm sorry about this, I'm just working on my first ruby script which
299359 [adam_penny@h] Sorry, I'm a muppet.

Email/SMTP::NET Problems
299360 [brantley_shi] Greetings,
+ 299362 [brantley_shi] Anyone have any idea of a quick solution?
| + 299364 [phil@s1 6. e] It might be that I'm missing something but
| | 299365 [brantley_shi] Phil,
| + 299380 [ara.t.howard] you need
|   299381 [brantley_shi] I thought the same,
|   + 299382 [ara.t.howard] just realized - you have the arguments reversed
|   | + 299383 [d_rems@ya oo] smtp.send_message myMessage, 'postmaster@my.com', send_to
|   | + 299384 [chippersbox@] ...
|   + 299390 [botp@de mo t] On Behalf Of Brantley Shields
|     299436 [brantley_shi] Greetings,
|     299444 [ara.t.howard] show us the error.  to untaint you can do something like
|     299448 [brantley_shi] I no longer have access to the logs so I can't reproduce the error, but
|     299450 [ara.t.howard] you've got to post some errors if you want some insight - otherwise
|     299459 [billk@ct .c ] Agreed.  However, if you really don't have access to the log files,
|     299492 [brantley_shi] Greetings everyone,
|     299496 [brantley_shi] to_address = cgi['email'].strip
+ 299367 [phil@s1 6. e] ok i had another look at this example, which doesn't look bad at
  299368 [brantley_shi] Yes it does hold the email, I comment out the attempt on sending the
  + 299371 [brantley_shi] This simple problem has caused me more grief than I think its worth
  + 299373 [billk@ct .c ] What if you print the whole myMessage to the buffer?
    299375 [brantley_shi] Bill,
    299376 [ara.t.howard] this can't be correct.  your code has '<' and '>' around the addr but
    299377 [brantley_shi] buf+="em: #{ CGI.escapeHTML em.inspect } <br />"
    299378 [brantley_shi] buf+="myMessage: #{ CGI.escapeHTML myMessage.inspect } <br />"
    299379 [ara.t.howard] so there you go - the address is right there.  what's the issue now?

wsdl2ruby
299363 [phil@s1 6. e] I'm stuck in the begining. Could someone point me to what I've to do
299366 [phil@s1 6. e] Ok,

Question about array.each{|x| delete x}
299391 [frisco@ap le] myArray = [1, 2, 3]
+ 299396 [botp@de mo t] # "why isn't it 1 2 3 one three 1 3?".=20
| 299510 [shortcutter@] e elements will rearrange/move to logically occupy that deleted space.
+ 299411 [dave.du.verg] myArray.dup.each {|x| ... delete from (original) myArray in

Puzzeling little inconsistency
299393 [robert.dober] I just stumbled upon this, not sure what is going on here. BTW Ruby,
+ 299398 [decoux@mo lo] Try this
| + 299401 [robert.dober] Guy you did not redefine % as I did, of course it still behaves like
| + 299405 [robert.dober] Ok I see it *now* sorry my brain just put the quotes which were not there.
+ 299400 [calamitates@] I'm seeing the same behavior as you are, provided that I remove the
  299402 [robert.dober] Oh thanx Peter, I just had the idea to use parse tree the next time

inverse OOP
299394 [martin@op ng] I have always had a doubt about OOP.
+ 299403 [eleanor@ga e] Then define either a projection class from which they all inherit, or
| 299512 [shortcutter@] What exactly do you mean by "intermediate"?  Do you mean that all
| + 299521 [martin@op ng] For example
| | 299542 [eleanor@ga e] I hate telling other people how to code, but yes it looks very much
| | 299711 [shortcutter@] a class that inherits from multiple parents?  So basically MI is just
| | 299916 [martin@op ng] Thanks all hehe
| + 299540 [eleanor@ga e] And if these functions are included from a module their names should
+ 299532 [flo@an er gr] Actually, thats quite a common problem of thought, because inheritance

puts "\\".gsub("\\", "\\\\")
299395 [martin.anker] puts "\\".gsub("\\", "\\\\")
+ 299397 [botp@de mo t] # Hello, I have a mini-ruby quiz. Guess what this line of code writes to
+ 299424 [overlord@gm ] Well, it's an faq. In short: The backslash is special in strings *and*
| 299431 [rick.denatal] Another thing which trips up newbies, and sometimes not so newbies, is
+ 299550 [matt@ti bi s] <http://groups.google.com/group/comp.lang.ruby/msg/d370b684485c8838>

Executing systems commands
299406 [jayeola@gm i] =begin
+ 299412 [framefritti@] Just a hint (maybe wrong): could this depend on the fact that "type"
+ 299422 [overlord@gm ] which and whereis are real programs

Ruby & Artificial Intelligence
299409 [pranjal.jain] Does anybody have any fair idea how we can use ruby for AI.
+ 299413 [jan.svitok@g] If you tell more precisely what kind of AI do you mean, you'll get
| 299420 [pranjal.jain] By AI I mean "language processing" here.
| + 299435 [ed@ve yr al ] Ilya Grigorik has posted a series of detailed and practical articles
| + 299502 [kbloom@gm il] I do this kind of thing, but most of my processing is done in an SQL
|   299556 [pranjal.jain] Suppose I am having a sentence like this
|   + 299764 [celtic@sa ry] ...
|   | 299800 [znmeb@ce ma ] Well ... programming in "natural" languages has been a dream for
|   | 299821 [cmdjackryan@] How do you see code like 'a = b unless c' in Ruby, then? Ruby's pretty
|   | 299849 [codeblogger@] ...
|   + 299869 [stiv.thomas@] Neither is the 'processing' unit of the brain performant enough to be
|     299872 [caduceass@gm] This is why there exists reliance upon language convention and unit
+ 299415 [biihii@gm il] I stumbled across http://web.media.mit.edu/~dustin/rubyai.html the

Calling C functions from Embedded Ruby Interpreter
299410 [mo_mail@on h] I know the subject line is quite a mouthful!  Sorry about that.
+ 299416 [mo_mail@on h] does have the necessary to help me connect the dots.  I was staring at
+ 299423 [overlord@gm ] I don't see anything wrong in the subject line.
  299779 [mo_mail@on h] First, my apologies on the late response.  Thanks for your email

How to add function parameter and conditions dynamically ?
299414 [varun.rajesh] I have one function in that function i wanna add parameters and
299515 [shortcutter@] "Function in a function"?  Like

FasterCSV.foreach lineno?
299417 [Bil.Kleb@NA ] OK, so I can't think my way out of a paper this morning.
+ 299425 [Rob@Ag le on] Bil,
+ 299428 [james@gr yp ] No, but you can switch to an each() iterator and get at it that way
  299454 [Bil.Kleb@gm ] Yes, thanks.
  299455 [james@gr yp ] James Edward Gray II
threads.html
top