358243-365097 subjects 358664-372579

find days between two dates span different years
358471 [chen_li3@ya ] Which method is used to calculate the days between two dates spanning
358473 [janfri.rubyf] => false
358521 [chen_li3@ya ] Thank you so much,

problems with mechanize and inheritance
358478 [thiagobranda] rails environment using script/console.
358493 [thiagobranda] In case someone gets the same error, you must explicitly set a html

Class vs Module in constant lookup
358481 [peter.mclain] Constant lookup behaves differently if there is a class versus a
+ 358490 [vikkous@gm i] Extending your example a little to actually look up the constants
| 358504 [peter.mclain] Well, the code isn't mine, but I'd still like to understand if
| 358510 [vikkous@gm i] Ok, I see your problem, and I sympathize.
+ 358509 [fxn@ha hr f.] I believe C::XYZ works because C is a subclass of Object.
| 358514 [peter.mclain] I think that will end up being part of the explanation, but I'm not
| + 358517 [fxn@ha hr f.] Yes I also checked the book and albeit it is clear that the algorithm
| + 358697 [fxn@ha hr f.] Or else the spec needs rewording.
|   359005 [fxn@ha hr f.] Just a followup, the spec has been indeed revised, M::X does not look in Object.
+ 358745 [peter.mclain] Since I didn't get a good answer here, I posted the question on ruby-

ruby gem install mysql compile error
358482 [ajmccauley@g] I am having an issue installing the mysql gem on my fedora 11 ruby
+ 358492 [luislavena@g] ou t
+ 358498 [brabuhr@gm i] /usr/local/lib/libssl.a
  358503 [ajmccauley@g] I did build openssl-0.9.8l from source.  In hind sight, it would have
  358520 [ajmccauley@g] I just rebuilt the server and used the Fedora packaged openssl and it

Test::Unit::Omission - Unable to omit tests
358485 [champaka@li ] I am trying to omit some tests while using the test unit framework. My
358491 [djberg96@gm ] Two things. First, your tests must be defined within a subclass of
358495 [champaka@li ] Thanks Dan. I have modified the code snippet I sent earlier to include
+ 358600 [djberg96@gm ] Get rid of the first 2 require lines. Also, you don't need to create a
| 358629 [champaka@li ] I was unable to get the omit functionality working, even after I removed
| 358649 [ryand-ruby@z] removed=20
| 358668 [champaka@li ] I simplified the code as much as possible below. omit is still not
| 358669 [kou@co mi ng] require 'rubygems'
| 358746 [champaka@li ] I get the following error when I run it as suggested above.
| 358798 [kou@co mi ng] Thanks for your reporting.
| 358829 [champaka@li ] Thank you for fixing this so quick. This worked without any errors when
+ 358631 [drbrain@se m] If you're going to use the test-unit gem you must require files inside =

Logger datetime_format not respected
358499 [threadhead@g] When creating a new logger, the datetime_format is not respected.
358501 [wishdev@gm i] Good Afternoon,
358505 [threadhead@g] require 'logger'
+ 358506 [wishdev@gm i] Afternoon again,
+ 358507 [threadhead@g] Figured it out. When you override the formatter, it's not passing

how to mix audio files
358500 [zeljko@gm il] programatically. Is there easy way to do this in ruby? I don't really
+ 358528 [albertschlef] It says in the FAQ it has a library too, but maybe using the
+ 358549 [chris.killim] Maybe Minim?  I have used it from ruby-processing and was pleased with

[ANN] Ohm 0.0.33
358511 [michel@so er] Ohm is an object-hash mapping library for Redis, and this version adds

[ANN]  March Phoenix Ruby User Group Meeting
358519 [james.britt@] March Phoenix Ruby User Group Meeting

RMagick gem on Windows (was: Can't install hpricot gem)
358527 [luislavena@g] vels)

Splitting up a file
358531 [stuart.clark] Hey,
358532 [jgabrielygal] csplit testsplit.txt /DATA/ "{*}"

358534 [dawid.marcin] ".".split(".")
+ 358535 [dawid.marcin] #Ok, instead of
+ 358538 [luislavena@g] There is nothing before or after the period.
  358540 [eregontp@gm ] $ ri String#split

Submitting Bug Reports
358537 [alex.decaria] I have an app that consistently runs for a while and then crashes with a
358560 [vikkous@gm i] Yes, these are serious bugs.

Using anchor for cancel in a Form
358542 [aw9578@at .c] and canceling a form in Rails.

Ruby Midwest Conference Opens Call for Speakers
358545 [lpillow@gm i] The Ruby Midwest Conference <http://www.rubymidwest.com/> has opened its Call

Ruby Midwest Conference Opens Call for Speakers
358550 [lpillow@gm i] The Ruby Midwest Conference has opened its Call for Speakers (http://

Shared hosting recommendation?
358551 [email.rafa@g] Can anybody recomend a shared hosting provider for Ruby on Rails apps?
+ 358552 [jgabrielygal] I don't have direct experience but I've heard about Heroku
| + 358555 [sophrinix@gm] 'm
| | 358556 [jgabrielygal] I'm
| + 358563 [email.rafa@g] Hey Jesus, which is the usenet group specific to rails? I've searched
|   358571 [jgabrielygal] Jesus.
+ 358553 [sophrinix@gm] I have no affiliation with the company I am about to suggest, but
| 358554 [sophrinix@gm] By affiliation, I mean other than as a customer. :-)
+ 358558 [nick@ni k- r] I have tried Google App Engine and A Small Orange. AE free but it has
+ 358561 [email.rafa@g] Thanks for your anwers. I will check out a small orange.

Limit number of concurrent running threads in pool
358559 [jm202@ya oo ] I created a pool of threads (say, 500 threads) to process.  However, due
+ 358562 [rogerpack200] might help.
| 358572 [jm202@ya oo ] Thank you very much, Roger.  I found this link
+ 358602 [shortcutter@] Why do you create a pool much larger than the load you want to accept?
| 358604 [jm202@ya oo ] When running this program, I will provide a list of items that need
| + 358607 [shortcutter@] For this scenario a thread pool with fixed size seems sufficient.
| | 358645 [jm202@ya oo ] Very good.  This works quite nicely as well.
| | + 358647 [vikkous@gm i] Yes. Threads use memory (quite a lot of it, in fact). Mostly this goes
| | | 358735 [jm202@ya oo ] Thanks!  I figured this was the case.
| | + 358678 [shortcutter@] Which other method are you referring to?
| |   358737 [jm202@ya oo ] Well my original thinking was to create a thread for every single item I
| |   358740 [shortcutter@] Ah, OK.  Then I was just confused because you had used the term
| + 358609 [cremes.devli] The Threadz gem let's you create a thread pool and then wait on its completion before you add more to it. This mechanism will help you cap the number of threads making database calls.
+ 358603 [cremes.devli] I've had very good success using the Threadz gem.

358566 [mikeshn@gm i] ...

[ANN] Sunspot 1.0.0 Released
358567 [mat@pa ch co] SUNSPOT

ANN: Sequel 3.9.0 Released
358568 [code@je em e] Sequel is a lightweight database access toolkit for Ruby.

archflags for compiling gems 64 bit
358574 [dale8458@gm ] I am trying to understand if the archflags='-arch x86_64' flag is used
358577 [ged@Fa ri MU] You typically don't need to use this flag on any other platform (though
358578 [dale8458@gm ] Thanks that help put my mind at rest.  I did compile the 1.9.1 ruby in

A good portable text editor/IDE for Ruby?
358576 [xxreiichixx@] I am searching for a good portable text editor or IDE for Ruby to use on
+ 358581 [vikkous@gm i] What is your definition of 'portable'? Something that runs from the
| 358587 [xxreiichixx@] Something that runs from the same installation dir on my USB PenDrive
| + 358588 [xxreiichixx@] It will be awesome if is an IDE where I can run programs directly in it
| | 358590 [mo_mail@on h] shows gVim and Notepad++ as portable apps.
| + 358614 [reid.thompso] ...
| | 382207 [sunaku@gm il] For similar functionality in Vim, check out the Screen[1] plugin
| + 358620 [benemue@go g] You can have gvim veeery Ruby oriented. I'd recommend installing
|   358658 [eric.promisl] You could run Komodo off a pen-drive, with a separate director for
+ 358582 [reid.thompso] ...
| 358584 [benemue@go g] GVim is the only thing zou need :)
| 358595 [marco-oweber] If you go that way give vim-addon-manager a try.
+ 358660 [gmkoller@gm ] Just my quick 1 cent worth, without studying all the replies: The
+ 359520 [shortcutter@] If I'm not mistaken nobody suggested JEdit yet.
| 382144 [robert.dober] Now that it seems to work nicely on Linux too, I'd give redcar a try
+ 382137 [zhaocheng@df] Hey, iknow someone discuss this problem in
| 382150 [spiralofhope] ...
+ 382190 [f.linard@fd ] +1 for Geany on Windows... (didn't try the protable edition, but should
+ 382421 [color.circle] you can make your own portable app too, if prefer to.

System Stats from Ruby?
358579 [nrhird@gm il] I am new to ruby but am working hard to learn all i can. Is there a
+ 358599 [djberg96@gm ] Regards,
+ 358612 [s.korteling@] For a windows-only solution I'd recommend ruby-wmi (gem install

Outputting to a string
358585 [albertschlef] I have a function that generates some textual data that I capture into a
+ 358589 [robert.dober] very ugly, but I am sure you can c?lean it up
+ 358591 [jgabrielygal] I'd just have gen_data return the string and let the caller make the

Base-64 encoding--Just for the fun of it!
358586 [astounding@g] require 'base64'
+ 358610 [astounding@g] This morning I realized I could shave off 3 characters by eliminating
+ 358625 [s.korteling@] c=(65..122).to_a.join(&:chr)+'0123456789+/'
+ 358654 [transfire@gm] While lacking in the joy of code golf you may still be interested to
| 358656 [s.korteling@] Yes i am. And please ignore my previous post in this thread, it's
+ 358665 [wyhaines@gm ] def e(s);[s].pack('m');end
| 358671 [astounding@g] Thanks for contributing something useful to me.  I've always used the
+ 358686 [apeiros@gm .] Actually that's deprecated in 1.9 afaik. Somebody else already pointed out that you can use Array#pack.
  + 358691 [astounding@g] Gorgeous!
  + 358703 [astounding@g] I notice you could shave off 2 more characters by using the same ?

RedCloth, JRuby and national characters
358592 [cfb@jn at .d] I posted this in the RedCloth forum but noone has replied. Anyone in

The desktop application on Ruby
358593 [refermaker@y] Greetings! At me a question - whether it is possible to create the
358606 [aldric@tr vo] Yes, it is possible to create "normal" software in Ruby, using graphical

Webrick hangs following periods of inactivity
358605 [kmattocks.sw] I'm using WEBrick as my webserver with Redmine.  I start the WEBrick

Net/ssh & send_data
358608 [dawa.ometto@] I would like to use the net/ssh gem to connect to an ssh server, execute
358651 [b.candler@po] Not exactly answering your question, but Net::SSH::Telnet is a small
360892 [dawa.ometto@] Thanks for the reply. Been a while since I managed to take a look at
360960 [b.candler@po] Depends what you mean by "safe". I don't know if Net::SSH 1.x is being

On what of these books is better to start to study Ruby?
358611 [refermaker@y] 1. The Ruby Way: Solutions and Techniques in Ruby Programming, Second
+ 358613 [tshanky@gm i] Read http://www.humblelittlerubybook.com/ and start coding!
| 358615 [refermaker@y] Thanks, but this book of 2006 and old version Ruby :(
| 358618 [tshanky@gm i] If you know everything in this book, you will not struggle with learning the
| 358619 [refermaker@y] Shashank, thanks!
+ 358616 [jan.h.xie@gm] I'll suggest Programming Ruby then The Ruby Way.
| 358617 [refermaker@y] THANKS!
+ 358632 [jm202@ya oo ] I have Beginning Ruby.  It's good and explains things well, definitely
+ 358635 [rick.denatal] I wouldn't start with this one, plus, it's rather old now.  It's more
+ 358670 [alex.decaria] I would start with 'Programming Ruby 1.9 The Pragmatic Programmers???
+ 358674 [markhobley@h] Interesting. I bought SAMS Teach Yourself Ruby. I wonder how that compares.
+ 358726 [b.candler@po] Also consider the 2nd edition of that book (for 1.8). You'll probably

CentOS 5 and Ruby 1.9.1 - conflict with 1.8.6
358626 [billda@gm il] Hey all,
358630 [shortcutter@] IMHO the best way to go about this is a) either get a RPM from somewhere

Different behavior of '$,' output separator in Ruby 1.9
358633 [alex.decaria] In switching to Ruby 1.9 from 1.8 I notice that the behavior of the '$,'
+ 358636 [vikkous@gm i] That doesn't seem right.
| 358677 [shortcutter@] I agree.  1.9 writes one field separator too much.  This must be a bug.
| 358699 [alex.decaria] Should I submit a bug report, or do you think it will be eventually
| + 358705 [shortcutter@] Kind regards
| + 358706 [vikkous@gm i] File a bug.
+ 358637 [dnspringer@g] Alex,
+ 359023 [matz@ru y- a] Sorry it was a bug introduce in r11003.  Fixed in r26906.

Conditional keys in hash - out of the box?
358634 [svoop@de ir ] Cumbersome title, here's what I'd like to do both elegantly and without
+ 358638 [jgabrielygal] I'm not sure I understand. You want too add :that => 'blue' to the
| 358639 [ruby-forum@w] method {:Apples => 1}.merge(condition ? {:Oranges => 2} : {})
| 358643 [jgabrielygal] Oh, good one ! That's much clearer than my one liner. I still prefer
| 358646 [nick@ni k- r] For the love of all that is good and holy, please do not try to cram two
| 358648 [walton@vy er] It's called Perl golf. It amazes and terrifies me how much it is still
| 358653 [vikkous@gm i] mymethod :this => 'green, :that => ('blue' if condition)
| 358655 [svoop@de ir ] Yep, I need it with form_for in Rails which doesn't like :method => nil.
| 358675 [rick.denatal] If you can't use the resource oriented form of form_for which lets
| 358721 [svoop@de ir ] You're right. However, I was wondering if there were a solution that
+ 358641 [m.fellinger@] p({this: 'green'}.merge(1 == 2 ? {that: 'blue'} : {}))
+ 358657 [joelvanderwe] Here are two suggestions that are more verbose, but also more readable,

Can I do a query SQL with various tables using find_by_sql?
358640 [cnjbravo@ya ] I need to do a query with various tables, but I want to use something
358650 [b.candler@po] It depends on what database access library you are using. There are many

Buy Genuine Google Adsense Account only for Rs.200/- for indian  people.
358642 [earnmoney942] Buy Genuine Google Adsense Account only for Rs.200/- for indian

Cannot allocate memory (Errno::ENOMEM)
358652 [thomas.sheal] I'm using a ruby to setup an ec2 instance as part of a bootscript.  The
358679 [shortcutter@] Note, your Ruby script may run out of memory while *running* the command

Why no TextMate for Linux?
358661 [gmkoller@gm ] I spent some happy development time in "VisualAge" for Smalltalk +
+ 358662 [sophrinix@gm] There is, its called redcar and it is built entirely in ruby.
| 358663 [sophrinix@gm] Keep in mind that Textmate is not free software.
+ 358672 [ninja@sl ph ] Keep in mind that TextMate is proprietary, and as far as I know, is not
  358680 [xenogenesis@] Probably because its very good software on a very good OS? Using
  + 358695 [robert.dober] Because it is derived (completely legally) from one of the soundest
  + 358909 [ninja@sl ph ] That much is true, most of the time.
    + 358911 [sophrinix@gm] My earlier statements apparently went totally ignored.
    | 358919 [ninja@sl ph ] Looks interesting.
    + 358920 [usenet-nospa] Just as a data point, I still use vi as my primary editor (nvi by preference,
    | + 358925 [skim.la@gm i] While I have not tried, the linux version of e-texteditor (originally only
    | | + 358933 [reachme@ch r] Read about the author's own unique style of open source here, which is
    | | + 358993 [rogerpack200] It is free but unless you register will give you a popup at startup time
    | |   + 358998 [skim.la@gm i] I'm going to keep a watchful eye on Redcar, thanks.
    | |   + 359368 [reachme@ch r] Yeah, e needs quite a bit of love on Linux still. I don't believe that
    | + 358926 [rimantas@gm ] Fear of some bad thing to happen (and most of which are not very
    | | 358927 [usenet-nospa] In general, yes.  The key thing there is that, no matter what happens
    | + 359012 [ninja@sl ph ] So long as the current version continues to work.
    |   359016 [usenet-nospa] Well, yeah.  You know, some of the computers I've bought in the past
    |   359020 [ninja@sl ph ] I suppose that's the difference between buying and renting software.
    |   + 359021 [usenet-nospa] Sort of.
    |   | + 359024 [josh.cheek@g] I don't understand the debate, it's just a text editor. It doesn't encode my
    |   | + 359030 [hramrach@ce ] If you are willing to pay the money you did for the proprietary
    |   | + 359072 [ninja@sl ph ] Actually, that in particular was blatantly obvious until very recently.
    |   |   359118 [usenet-nospa] Not necessarily for the best.
    |   |   359258 [ninja@sl ph ] A cat is a living creature, which complicates things.
    |   |   359341 [usenet-nospa] True.
    |   |   359380 [ninja@sl ph ] Not the legal right to torture, and I'm not sure when you're allowed to kill
    |   |   359383 [usenet-nospa] So far as I can tell, whenever you want.
    |   |   359390 [ninja@sl ph ] It's a fair point, but no less frustrating. In the case of a restaurant, you
    |   |   359391 [usenet-nospa] Probably because you can't cap bandwidth -- the phone is effectively broken
    |   |   359393 [ninja@sl ph ] Well, its Internet functionality is. It can still make phone calls, unless
    |   |   359395 [usenet-nospa] It is more complicated.  For instance, one of my phones, if reset, restores
    |   |   359401 [ninja@sl ph ] Certainly. But again, that's something which can be dealt with in practice,
    |   |   359403 [usenet-nospa] Not really.  I have written dozens of one-off C programs for that
    |   + 359035 [diego.viraso] eh??? How's Textmate a rented software? I can use it forever: nobody
    |     + 359036 [josh.cheek@g] With all the things you can change and program, there is a pretty decent
    |     + 359039 [hramrach@ce ] Yes, it is rented, pretty much all software is. By law you own only
    + 358934 [diego.viraso] To be honest with you I find your arguments weak at best. At the end
      359009 [ninja@sl ph ] Yes, I acknowledged this, and it's why I care much more about people using IE
      359033 [diego.viraso] Here I disagree. When I moved from another text editor to emacs, it