390153-391264 subjects 390544-391933

[ANN] omnifocus-github 1.3.0 Released
390341 [ryand-ruby@z] omnifocus-github version 1.3.0 has been released!

loaderror- "No such file to load"?
390344 [tpclhk@gm il] installed.
+ 390348 [echristopher] ubygems/custom_require.rb:31:in
+ 390437 [koplimi@gm i] I found the solution after half an hour. Damn typo's!

error of setting up Ruby1.9.2 on Debian6
390356 [yozloy@me co] Hey Everyone,
+ 390357 [sutniuq@gm .] Try using "ruby1.9" or "ruby1.9.1" instead of "ruby".
+ 390395 [terceiro@so ] On Debian 6 the default ruby is 1.8.7, so ruby1.8 is the only package

gzip json jquery ajax github
390363 [transfire@gm] ...
390370 [whitequark@w] Yes.

How to run a program (Newbie)
390365 [ottodydakt@y] "puts 1" it returns "1" and "puts 1+2" returns 3. All seems good.
+ 390366 [ToMaTo@Go gl] Open windows command line interface then type "ruby
+ 390367 [jeremy@bo p.] The command your book tells you to run should not be performed in irb.
+ 390368 [ottodydakt@y] Thank you ToMaTo and Jeremy. Jeremy your explaination worked. I copied
  + 390369 [steve@st ve ] Learn to Program is a spectacular book, you're in good hands.
  + 390371 [waynefb@ea t] ...
    390372 [alexandermcm] ...

Principle of Best Principles
390374 [transfire@gm] ...
+ 390375 [isaacbfsande] If you are interested Ruby Design Patterns and Idioms, check out Russ
| 390376 [steve@st ve ] Just delegate.
| 390379 [transfire@gm] ...
+ 390377 [petite.abeil] Hmmm... perhaps.... but does this have anything to do with OOP per se?=20=
+ 390383 [shevegen@li ] Such an answer does not help at all.
| 390385 [darkintent@g] While ramming it in is an option, I think that it does pay to try and
| 390386 [mike@os n. r] Well, my experience so far is that it's wrong to just rush
+ 390387 [shortcutter@] le,
  390405 [transfire@gm] ...
  390414 [shortcutter@] Just out of curiosity: whereabouts do you hear so often about
  390417 [sean.ohalpin] Not really on topic, but if anyone's interested in the gory details of

[ANN] mogilefs-client 3.0.0-rc1 released
390380 [normalperson] A MogileFS client library for Ruby.  MogileFS is an open source

[ANN] QED v2.7.0 released
390381 [transfire@gm] QED 2.7.0 has been released.

[ANN] YARD QED v0.1.0 released
390382 [transfire@gm] YARD QED 0.1.0 has been released.

Why no import.* in Ruby?
390384 [shevegen@li ] Why does Ruby not use import?
390390 [peterhickman] Why?

NameError in ClistingsController#create
390388 [gbolahanajib] NameError in ClistingsController#create
390389 [gbolahanajib] NameError in ClistingsController#create
390391 [godsent@ma l] @clisting = Clisting.new(params[:clisting]) #Clisting.new instead

No acceptor (RuntimeError)
390393 [downeyjordan] I kinda need your help here, I keep having this error and I can't find

how to call Function argument into another ruby script.
390396 [harismahesh@] Consider I have a ruby file called library.rb.
390397 [jgabrielygal] You could create a class in library.rb that receives a testcase in the
+ 390399 [shortcutter@] Just a minor nitpick: the file should not be called "library.rb"
| 390402 [sylvester.ke] library.rb.
+ 390400 [harismahesh@] When I run I am getting an error "undefined local variable or method
  + 390401 [sduncan@we a] Looks like you are trying to use variables before they are defined.
  + 390403 [sylvester.ke] Here you're passing the variable 'testcase'  which you have not defined =
    390404 [harismahesh@] Wow...thanks a lot it worked. So my another doubt arises. This was for 2
    390424 [harismahesh@] This is my entire script
    390429 [shortcutter@] <snip/>

Regular expression match
390406 [aggouni2002@] str[/\A([a-z]\w*)/, 1]
+ 390407 [ToMaTo@Go gl] This syntax is used to return the matching portion of supplied regxp. For
+ 390408 [sylvester.ke] ri String#[]
+ 390410 [aggouni2002@] Thank you for your answer
  390415 [shortcutter@] Sounds like you rather want String#scan.

[ANN] MountainWest RubyConf 2012 CFP
390411 [blowmage@gm ] ZOMG! WE SO EXCITED to announce that MountainWest RubyConf is back for

Open URI Redirect Loop
390413 [wielgosm@gm ] Hey guys,
390433 [matma.rex@gm] The HTTPS link you gave doesn't work for me. The HTTP one redirects to
390439 [wielgosm@gm ] Hmm, I just copied / pasted them and true enough, neither one of them did what it was supposed to (i.e. take me to the Windows marketplace search with results of "Angry Birds").

Removing directories older than x days old
390418 [multicomdata] older than 5 days old.  I can't seem to get the datetime for the
390419 [shortcutter@] You do not want to substract the number of seconds from a timestamp to
390420 [multicomdata] Thank you Robert.  Its working now.

run an script without waiting to be done
390425 [tcblues@gm i] waiting to be run. I mean, can I call another ruby script and not be
+ 390426 [rubytalk2dav] If you are running this on a Unix-type machine (including Linux and
| 390427 [tcblues@gm i] some of the machines run on Windows... and other on Linux
+ 390428 [sutniuq@gm .] Use #spawn instead of #system. This works (with newer Ruby versions)
| 390430 [tcblues@gm i] Thanks We are working on Ruby 1.8.7 so no good news :(
+ 390432 [joelvanderwe] t = Thread.new {
| 390434 [matma.rex@gm] that simply launches whatever was given to it in a separate command
| 390436 [tcblues@gm i] Thanks, I think this is what I was looking for
+ 390435 [mcpierce@gm ] Why not just run the second script (myScript.rb) directly? What's the

Network connection to ruby daemon script connect on public ip of local machine but fails remotely
390431 [cerieljacobs] On a Mac OSX 10.5.8 server OS,

block.arity when using each_with_index
390440 [amberarrow@y] I have a class with a custom iterator (each) that uses block.arity to
390443 [matma.rex@gm] Why do you need to check the arity at all? If your method behaves

Create Excel Sheet(.xls/.xlsx)
390442 [micky.tour@g] I need to create a excel sheet(.xls or .xlsx).
+ 390444 [waynefb@ea t] ...
| 390470 [junegunn.c@g] Are you sure you want to write your own code for handling Excel binary format?
| 390536 [micky.tour@g] Thanks Choi.
| 390596 [junegunn.c@g] Which version of Ruby are you using?
+ 390792 [digital.ipse] You should look at axlsx and act_as_xlsx

Newbie: Calling dll functions from Ruby for a customer dll
390446 [omran_nazir@] I have searched to forum previosly but have found little in the way on
390453 [omran_nazir@] ret = h_rrcLib.afRRCLibraryDll_RunTestScript ( "REGISTER",
390457 [cremes.devli] I recommend taking a look at the win32-utils project. Don't worry too much that there haven't been a lot of updates since 2009; that's probably because the sub-project "just work."
390459 [omran_nazir@] Great, thank for your response. I'll start here. TC

RMagick on CentOS
390447 [b1368810@lh ] I have app, in which RMagick gem required (it place in bundle install).
+ 390448 [shortcutter@] Looks like you forgot to install a prerequisite.  See "What
+ 390483 [b1368810@lh ] Hmm...

private and protected
390449 [godsent@ma l] Could anybody explain me this, please?
+ 390450 [peterhickman] The call 'self.phrase' is a call to a class method but 'def phrase' is
| + 390452 [adam@ap es o] This isn't correct, it has everything to do with private or protected! The
| | 390455 [luke.gru@gm ] Although, a common workaround if you really need to send an object a
| + 390456 [shortcutter@] I am sorry, this is wrong.  A class method would be called with
+ 390451 [ruby@sl gh l] =20
  + 390472 [godsent@ma l] Thank you for your answer, saved me from future mistakes.
  + 390475 [peterhickman] I stand corrected.

Re: Postfix to Infix (#148)
390454 [gmoeller@gm ] Greetings -

need help with gsub a string
390458 [skolopen@ya ] Lacking in regular expressions knowledge, I am having difficulty
+ 390460 [ian.asaff@gm] something like this?
| 390462 [ian.asaff@gm] this is simpler...
| + 390463 [adam@ap es o] If only there were variable-length look-aheads, then it could be (?<=\/ ?),
| + 390464 [hassan.schro] Or on the off chance there might be additional slashes in there --
|   390467 [ryand@ze sp ] On Nov 23, 2011, at 10:14, Hassan Schroeder <hassan.schroeder@gmail.com> wro=
+ 390461 [skolopen@ya ] This works very nice. I'm see new methods I can read up on.  Thank you

url normalization
390465 [aggouni2002@] I have a set of urls that I want to normalize but I can't find a regex
+ 390466 [sduncan@we a] Can you work with something like this?
+ 390469 [ryand-ruby@z] 581fe8e7386051d6dfgdfg4eca4c/
+ 390506 [shortcutter@] There is no defined generic semantic for the path and query parameters

1.9.3 fails to install via rvm on OS X Lion
390471 [darthdeus@gm] So here's the story
+ 390473 [phildobbin@g] Well, on Snow Leopard I have 7 flavours of C compiler to choose from with
+ 390477 [thebooleanfr] I had what looks like the same problem last week. After updating the rvm
+ 390612 [tom@to wa dr] I struggled with this also. I eventually just resorted to installing
  390616 [ryand@ze sp ] The problem wasn't with clang, but with a buggy version of autoconf. It is f=

390474 [prateek123@g] I have a long XML like below .. I wish to select DATA ("cdef" in this
390478 [jgabrielygal] doc.xpath("//key[. =3D 'English']/following-sibling::topic/data")
390480 [prateek123@g] Thanks a lot for help. But it matched CDEF and all nodes after that even
+ 390481 [prateek123@g] one way i can think of is to loop and break after getting first value
+ 390482 [jgabrielygal] I'm not sure why is this. I'm still trying to come up with a good
  390485 [shortcutter@] Well, there could be many matches and from the original posting I
  + 390486 [shortcutter@] a')
  + 390491 [jgabrielygal] What I don't understand is why that xpath returns nodes whose
    390494 [shortcutter@] en
    390532 [jgabrielygal] Now I see what was wrong with my reasoning. I was misunderstanding the

Genric List in Ruby
390476 [sagar.varule] I want to achieve Generic List in that is there in C# in Ruby.
+ 390479 [dido.sevilla] Ruby is dynamically typed. Even the basic Array type can contain values
| 390501 [podenski@me ] From my iPhone
+ 390510 [rubytalk2dav] It seems to me that the previous answers were essentially "Ruby lists

check if a element with a specific value exists in a xml using REXML
390484 [mithunpillay] i have attached a sample xml. I am currently using REXML ..basically i
+ 390490 [shortcutter@] e.g.
+ 390533 [pillay.mithu] i found a way out in rexml though...wntd 2 share with you..
  390534 [shortcutter@] YWC

How to create decremental for loop in ruby
390487 [worldofsitam] I want to know the simplest way to create a decremental for loop in
390488 [shortcutter@] $ ri19 Fixnum#downto

unixODBC and FreeTDS in ROR
390489 [periyasamy@r] All,

Understanding Ruby blocks
390492 [fs_tigre@ho ] I have been practicing Ruby and believe it or not the hardest part for
+ 390493 [jgabrielygal] There are several benefits and use cases for using blocks.
| + 390495 [sylvester.ke] That should give you a few great examples.
| + 390498 [shortcutter@] To make the code robust and ensure the resource is freed under all
| + 390499 [fs_tigre@ho ] So the main difference in this case is that by using block the file will be closed by itself and if I use the second method I would need to manually close it?
+ 390500 [fs_tigre@ho ] Thanks a lot I will read these articles.
+ 390551 [jakekaiden@y] the File.open block is really useful, but probably not the easiest way
+ 390569 [fs_tigre@ho ] Thank you all for your help!

How to make 1.9.2 my default version using RVM
390496 [fs_tigre@ho ] I know this may not be the right place to ask questions about RVM but I
+ 390497 [whitequark@w] The ordering of arguments is screwed up a bit in rvm.
+ 390502 [fs_tigre@ho ] Thanks for your help.
| + 390503 [ignar.name@y] You may create file .rvmrc in your project directory
| | 390507 [fs_tigre@ho ] Excuse my ignorance but where should I create this file? Sorry.
| | 390508 [hassan.schro] Any directory you want; when you cd into it, it'll be invoked.
| + 390504 [hassan.schro] If it "goes back" to the *system* Ruby, you're not invoking rvm at all.
+ 390511 [fs_tigre@ho ] Well no, it goes back to the system default
| 390512 [hassan.schro] Uh, the one on the RVM installation instructions page that I suggested
+ 390513 [fs_tigre@ho ] Oh, sorry about the missunderstanding.
| 390514 [hassan.schro] **and**
+ 390515 [fs_tigre@ho ] Is there any specific line we are looking for, do you want me to copy
| + 390516 [phildobbin@g] Uh, yeah. Copy the whole output, then post it...
| + 390517 [hassan.schro] That would have been the obvious response, but in any case -- this
+ 390518 [fs_tigre@ho ] (x86_64-apple-darwin11)"
| + 390519 [hassan.schro] Did you previously install a version of Ruby using MacPorts or Brew
| | 390522 [phildobbin@g] `$ sudo port uninstall --follow-dependents ruby19`
| + 390521 [phildobbin@g] So your using MacPort's ruby in `/opt/local/bin/ruby` It's usually the other
+ 390524 [fs_tigre@ho ] First of all thank you all for your help!
| 390525 [phildobbin@g] MacPorts is like a superior version of Fink. It's a package manager for
| 390538 [fs_tigre@ho ] RVM was installed directly from its site, however I would like to
| 390540 [phildobbin@g] `sudo port selfupdate`
+ 390527 [fs_tigre@ho ] Thanks a lot for your help!  I will try to read more to have a better
+ 390541 [fs_tigre@ho ] Thanks a lot for your help!
  390543 [phildobbin@g] No problem.

Process wait with timeout in Ruby 1.8.x
390505 [aschaal@le r] require 'timeout'

How to Design Module Method?
390509 [admin@te so ] module MyMod
+ 390523 [shortcutter@] irb(main):001:0> module Foo
+ 390529 [admin@te so ] To the best of my knowledge, in the methods I am not making use any

Emacs ruby-mode problems
390520 [sutniuq@gm .] Im using Emacs for editing since a few months now and enjoy it
390526 [ryand-ruby@z] the
390547 [sutniuq@gm .] This was just a suggestion as I dont have an idea as what else it

set logger.progname on a per thread basis
390528 [k.dorsel@gm ] class Stress
+ 390531 [shortcutter@] That depends on the implementation of the Logger you are using (which
+ 390537 [k.dorsel@gm ] Sorry I should have specified.
| 390542 [shortcutter@] I'd check whether you can insert a thread local into the log.  Java's
+ 390546 [k.dorsel@gm ] I don't see any reference to thread local in the built in Ruby logger.I
+ 390548 [k.dorsel@gm ] This seems to be what I want to achieve. How would I go about
  390562 [shortcutter@] $ ri19 Logger

Net HTTP Request, Force IPv6 or IPv4
390530 [hometurfpubl] I'm writing a monitoring script and checking services over IPv4 and

Is high-speed sorting impossible with Ruby?
390535 [chande.gaura] Well, first of all, I'm new to Ruby, and to this forum. So, hello. :)
+ 390539 [gilbertly@gm] Had a quick look at the problem and its comments. It seems that most
| 390545 [chande.gaura] Hey Yong Li,
+ 390550 [matthias@wa ] You _can_ treat it as a normal sorting puzzle, but you will not be able
+ 390565 [chande.gaura] Well I tried the tweaks mentioned by you. The sorting is still slow.
| 390567 [doug@ds if r] Here is a port of the fastest solution on that site in Ruby.  It of course
| + 390568 [gilbertly@gm] This counting sort implementation is a great optimization you can do
| | + 390573 [matthias@wa ] Well, time saved when reading 100k chunks of input a time (or even the
| | | 390591 [chande.gaura] Your solution does look interesting. I tried running it on codechef, but it seems it takes in more memory than Douglas' solution. Here http://www.codechef.com/status/TSORT,trashedcoder is the list of solutions I tried for the sorting.
| | + 390592 [chande.gaura] Exactly! That certainly seems to be the part which needs to be
| + 390570 [matthias@wa ] Great! Using STDIN/STDOUT instead of letting the kernel find them every
+ 390580 [joaopedrosa@] That has picked up my interest so I've used it to create a new project
  390593 [chande.gaura] Good thing you did, putting it on GitHub. I saw your solution in
  + 390599 [josh.cheek@g] 1) It doesn't show you a list of what problems you have and haven't solved
  + 390600 [doug@ds if r] A big gain can be had by disabling the garbage collector.  Here is my best
    + 390601 [doug@ds if r] Feel free to fork and add more.  Below is the result of running all the
    | + 390608 [chande.gaura] Yea. That really does make sense. The solution in standard_ruby.rb is
    | + 390617 [ryand-ruby@z] the
    |   + 390622 [chande.gaura] Totally makes sense to move on instead of trying to fit into constraints
    |   | + 390625 [sylvester.ke] of
    |   | | 390631 [ryand-ruby@z] that's why Ryan said the input data needs to be 'honest' in his previous =
    |   | + 390630 [ryand-ruby@z] blah.rb < inputfile
    |   + 390633 [matthias@wa ] Just playing with the code a little, more education than speed.
    |     390637 [josh.cheek@g] 2011/11/28 Matthias W=E4chter <matthias@waechter.wiz.at>
    |     390644 [matthias@wa ] Great one-liner, thanks!
    |     + 390645 [matthias@wa ] (oops, unfinished)  when something is requested on the output, and it
    |     + 390646 [shortcutter@] ted
    |       390647 [shortcutter@] class Source
    + 390607 [chande.gaura] Whoa! This one worked! The solution was accepted on codechef. But the
      390614 [doug@ds if r] problem. Could you share some insights? Why to disable the GC? What idea
      390621 [chande.gaura] Thanks for the explanation.
      + 390623 [sylvester.ke] The former always returns a new string instance (this is what you want); =
      | 390632 [ryand-ruby@z] lets
      | 390649 [sylvester.ke] lets
      + 390624 [matthias@wa ] The first one creates one array with 1e6+1 _different_ empty strings.
      | 390626 [shortcutter@] irb(main):001:0> Array.new(4, "").map(&:object_id)
      + 390705 [chande.gaura] Okay. Thanks all who explained this.
        390725 [josh.cheek@g] If Jerry, Bob, and sally live in different houses, and you blow Jerry's