371317-372187

371117-375751 subjects 371571-373214

"Load" Works, But "Require" Doesn't?
371317 [tom@to wa dr] Can someone please explain what's going on here. No matter what I try,
371332 [ammarabuali@] What version of ruby are you using?
371345 [tom@to wa dr] I'm on 1.9.2. This now raises a number of questions...
371354 [ammarabuali@] I'm not sure, but I guess (hope someone else will chime in) it is
371384 [sutniuq@gm .] In 1.9.x, there's require_relative for that purpose.
371440 [ammarabuali@] I keep forgetting about that one. Probably from avoiding it enough

testing if a script is run via sudo
371321 [unbewusst.se] Is tehre a way to test if a ruby script is run as a sudoer user ?
+ 371323 [sentinel1879] on my system, echo $USER gives root under sudo (mac os x).
| 371340 [unbewusst.se] I'm using too Mac OS X (zsh as default shell) i don't get samething as u
+ 371326 [b.candler@po] $ sudo ruby -e "require 'etc'; puts Process.uid, Process.euid,
| 371341 [unbewusst.se] i see, nice !
+ 371327 [ammarabuali@] 2010/10/7 Une Bvue <unbewusst.sein@fai.invalid>
  371342 [unbewusst.se] fine, thanks !

how do i close a file that is open in ruby
371322 [amittomer25@] i would like to close a file that is open in particular
371325 [shortcutter@] f is a String!  You cannot close a String.
371328 [amittomer25@] Thanks for your response robert
371336 [shortcutter@] You can easily do the same with system().
371337 [amittomer25@] Actully my problem starts from mongrel temp file that is not closed

Ruby and windows GUI
371344 [spaghetticod] a friend of mine has asked me to write a quick and simple application
+ 371346 [cmdjackryan@] Pretty much. Or you can create a setup archive, including the Ruby
+ 371385 [sutniuq@gm .] No. rubyscript2exe has been abondoned by it's maintainer. Use OCRA (
| 371386 [javaalley@gm] I agree with Quintus, OCRA and wxRuby are the way to go.  If you want to see
| 371392 [spaghetticod] Thanks to everyone for the bootstrap, that was exactly what I needed
+ 371771 [rogerpack200] recommend jruby + swing + rawr

Can anyone give a an example of this please
371353 [sbstn26@ya o] I understand how ONE parameter is passed using the 'each' method.
+ 371356 [cmdjackryan@] irb(main):001:0> [0,1,2,3].each { puts "no param" }
| 371358 [shortcutter@] There is _one_ parameter passed - you just do not pick it up in the block.
| 371361 [cmdjackryan@] Ah, then I misunderstood the question, I guess, thinking that the OP
| 371365 [shortcutter@] Actually I am not sure what the OP *really* wanted either. :-)  I just
+ 371357 [shortcutter@] called

how do i configure this code
371364 [amittomer25@] This is code for mongrel http_request.rb ,here i would like

Maximum length of array#hash
371366 [jack.zelig@g] I have a large array and want to calculate its hash-code using
371367 [jgabrielygal] Tells you the size in bytes of a Fixnum in your platform.
+ 371373 [shortcutter@] Having said that, what's the point in storing a hash code in a
| 371375 [jack.zelig@g] Thanks both for the answers.
| 371379 [shortcutter@] The RDBMS way to do it would be to define a unique index (or use the
+ 371376 [jeremy@bo p.] While this answers your primary question, take care with storing a hash
  371378 [jack.zelig@g] Oh right, I didn't realize. I was just looking at what methods I could

[ANN] 2011 Fukuoka Ruby Award Competition
371371 [matz@ru y- a] Fukuoka prefecture sponsors the thrid Fukuoka Ruby Award as past
371374 [shortcutter@] Are you giving any guarantees about the price of Yen at the day of payment?=
371382 [rick.denatal] t? ;-)

undefined method `*' for nil:NilClass
371381 [datulravi@gm] Please find the .txt file attached. Am getting the following error
371398 [b.candler@po] You need to give the *full* error, which includes the line at which the
371406 [datulravi@gm] Thanks for your reply. Fortunately I somehow managed to debug the error.

Open a windows device file handle in ruby?
371388 [bangingtechn] the path '\\.\MyDevice'. In C I can then use CreateFile() to open this
372180 [cbciv@ya oo ] Your assumption that you should be able to use standard Ruby IO

popen hangs out for user input
371393 [felix.leg@vp] <CODE>
371395 [jeremy@bo p.] It's probably because the write buffer for the pipe is not being
371396 [jeremy@bo p.] One more thing: you may need to insert a newline at the end of the
+ 371424 [shortcutter@] Another reasonable thing to do is to close the write end of the pipe
+ 371444 [felix.leg@vp] Both your answers works. THX!

[ANN] ruby-nis library packaged as gem 'nis' 0.1.1.1
371400 [mike.dalessi] nis 0.1.1.1 has been released!

urgent help required#<NoMethodError:
371405 [datulravi@gm] prompts5 = ["Span type"]
+ 371412 [jgabrielygal] Without knowing what inputbox does, it seems from the error message
+ 371471 [josh.cheek@g] I assume you are using Google sketchup, and you are invoking this method

regexp issue
371409 [shekarls@gm ] I have an issue in parsing regular expression and im new to
+ 371411 [stefano.croc] * $ means the end of the line
| 371416 [devguy.ca@gm] if you just want to match the currency including the brackets, the
+ 371417 [gf.bozzetti@] As Stefano Crocco pointed out $,(,) must be escaped.
+ 371422 [shortcutter@] First of all, "Variable" is a constant.  You need to make the name
+ 371433 [seanh1313@tx] \$[0-9]{1,} fee
  + 371441 [b.candler@po] \d+ is a more concise way to write that.
  + 371442 [shortcutter@] Instead of [0-9] you can type \d and instead of {1,} you can type + -

ruby 1.9.2, rubygems and gentoo linux
371414 [stefano.croc] On Gentoo linux, I have installed both ruby 1.9.2 and ruby 1.8.7, both

each_with_index
371419 [impulse221@y] def show_titles
+ 371420 [jgabrielygal] You don't need each_with_index for that. You have the list of articles
| 371434 [impulse221@y] Yes, but it returns me #<Article:0xb78c49a4>, not a title and a text!
| 371437 [nobuoka@r- e] The Article object should have a title and a text.
| 371439 [impulse221@y] def show_titles
+ 371421 [shortcutter@] You don't.  You just use Array#[], i.e. indexed access into the Array.
  371435 [impulse221@y] Thanks

How to change interactive ruby background?
371425 [menasx@gm il] to change interactive ruby background colour coz black colour isn't very
371426 [shortcutter@] Not sure what you mean.  There is no such thing as an IRB background.
371427 [menasx@gm il] I use windows xp, when i open IRB background is black and evrything what
371428 [stefano.miol] Yes, you should do exactly what Robert told you to do.
371431 [menasx@gm il] Thanks very much it helped me :)

how do i add  an instance variable to a class in Ruby
371432 [amittomer25@] I have one file named class1.rb this is structure
+ 371436 [b.candler@po] What do you mean by "i am not access value"? Did you try to? What code
| 371475 [amittomer25@] i didn't get any error meassage but in class2.rb i tried to print @a
| + 371477 [gf.bozzetti@] In class1.rb and class2.rb you create templates for the classes.
| + 371480 [b.candler@po] brian@zino:~$ cat class1.rb
+ 371472 [josh.cheek@g] Worked for me, are you sure you required the other file?
  371548 [amittomer25@] Thanks all for your response ,what am doing wrong is ,using
  371549 [jgabrielygal] In Ruby, instance variables are created the first time you assign them

require error
371446 [prpaulroche@] arguments (2 for 1) (ArgumentError)
+ 371447 [justincollin] Require only takes a single argument. If you want to load multiple
+ 371448 [cmdjackryan@] You didn't read the error message.
+ 371449 [jeanjulien.f] The error message seems pretty clear: 'require' is waiting for only
| 371450 [prpaulroche@] Thanks all for your replies. I failed to understand the error message.
+ 371451 [Joseph.Savar] Require takes 1 param.

hi.....
371452 [iamforufrien] <a href=http://adultfriendfinder.com/search/g1250650-ppc?

HI, WE R HOT COUPLES SEARCHING HOT PARTENERS FOR GOOD FUN,,,,
371453 [iamforufrien] men, women or coples are welcome

HI... WE R HOT COUPLES AND SEARCHING FOR HOT MAN, WOMAN OR COUPLES FOR REAL FUN
371456 [iamforufrien] REAL FUN

Monitor Resque with Bluepill
371458 [di3go.bernar] Anyone have any .bill file that can monitor resque?

Missing rake/extensiontask
371459 [ggarra13@gm ] I'm looking into compiling fxruby from its gem but it dies as it
371461 [b.candler@po] Why are you starting a new thread with the same question?

[ANN] Money 3.1.5 released
371463 [shane.emmons] Money 3.1.5

Reply
371473 [alexandercru] anyone who has had success networking in a forum. Thanks

Getting the size of a block device
371476 [spare@fr gi ] In Linux at least, one cannot simply get the size of a block device file
371484 [b.candler@po] The ioctl is called BLKGETSIZE/BLKGETSIZE64, and a quick grep of the
371495 [joelvanderwe] Does the sys-filesystem gem have something like that?
371941 [spare@fr gi ] I think this only tells the the block size of a mounted file-system. I

irb question
371485 [darren@th re] Iam starting to learn ruby, today is my first day actually working with
+ 371487 [sutniuq@gm .] Looks like something has set IRB to show the simple prompt instead of
| 371506 [darren@th re] The command irb --prompt inf-ruby worked to get it looking like the way
| 371523 [ed.howland@g] Thanks for this.
+ 371499 [program.ruby] I looked into it and I can only guess since you did not state it. But >>
| + 371501 [hassan.schro] Thanks, that was good for a laugh  :-)
| | 371505 [darren@th re] Thanks guys for the information. I Guess its not a big deal, I was just
| + 371503 [jeremy@bo p.] $ irb
+ 371500 [sutniuq@gm .] irb --prompt-mode default

hello
371486 [kategur74@ya] I saw your email in your profile here( www.eggheadcafe.com ) and become interested; my name is;Kate please send me your email address (kategur90@yahoo.in) to my box now so that i can send you my picture then we will know each other more;

Better way to remove all occurrence of matches on a String
371488 [eregontp@gm ] I remember many times I searched for a better way to "remove all
+ 371494 [list.push@gm] If you *really* want to avoid a second parameter, you could try
| 371498 [eregontp@gm ] Nice one, but I guess the extra parameter is not too bad compared to this :)
+ 371508 [josh.cheek@g] I think gsub with an empty string is ugly too, but I am pretty confident
| 371514 [eregontp@gm ] So I am not the only to think that :)
+ 371515 [shortcutter@] Don't waste too much thought on this.  After all the second parameter
  371517 [eregontp@gm ] akes

URL paramater sts - mechanize & nokogiri differences
371489 [dnorcott@mt ] I have written ruby code (with mechanize and nokogiri) to do the
371504 [dnorcott@mt ] I still have not resolved (or do not understand my problem) but the

Finding all cycles in a directed graph
371491 [casanejo@gm ] A->B->C->A
371493 [jeremy@bo p.] original author (Horst Duchne) left the Ruby community and transitioned
371507 [casanejo@gm ] cycles()
371511 [jeremy@bo p.] I see.  Do you need the minimum cycles passing through each vertex of

Highline
371497 [program.ruby] Was using highline for a program I am making for learning/fun. I got it
371502 [james@gr ys ] it

rspec-1.3.1 and rspec-rails-1.3.3 are released!
371509 [dchelimsky@g] I just released rspec-1.3.1 and rspec-rails-1.3.3.

`exec': wrong number of arguments (0 for 1) (ArgumentError)
371524 [saurabhnarai] I'm new to ruby and I'm facing one issue when connecting to Oracle 11g
371544 [saurabhnarai] My bad it should have been

Highline and Termios issues
371525 [ed.howland@g] I have question re: Highline. In this code fragment, when running on MacOS/=
371526 [james@gr ys ] You just want to take the answer on the same line?  Add some space after =
371529 [ed.howland@g] Thanks James.

More readable array querying
371527 [wagner.andre] All,
+ 371528 [ryand-ruby@z] readable.
| 371532 [wagner.andre] Thanks for the helpful feedback.
+ 371559 [w_a_x_man@ya] ing

RSpec-2.0.0 is released!
371531 [dchelimsky@g] ## RSpec-2.0.0 has been released!

Why does a lot of code not include parenthesis?
371533 [ken.egervari] I just started playing around with ruby and rails, and one thing I've
+ 371534 [ken.egervari] Oh, another reason I like using . and () is because IDE support is
| + 371538 [ninja@sl ph ] Get a better IDE, or learn to work without one. Seriously, it's pretty
| + 371610 [ara.t.howard] vim completion works with, or without, the '(' and ')'.  same with
|   + 371622 [josh.cheek@g] In this case, the negative sign is also a method. Fully parenned, it looks
|   | 371631 [ryand-ruby@z] looks
|   + 371688 [ninja@sl ph ] I actually really like this about JavaScript, but as it turns out, JavaScript
|   | 371777 [echristopher] ript
|   | + 371821 [code@ap th o] This is true but, to be fair, it can look an awful lot like direct access
|   | | 371875 [echristopher] Right, but I don't see what it has to do with the optionality of
|   | | 372187 [code@ap th o] ss
|   | + 371889 [ninja@sl ph ] My point was that JavaScript is like this, while Ruby is not. In JavaScript,
|   + 371780 [showell30@ya] Python is like Javascript in that regard.
+ 371536 [devguy.ca@gm] its a personal style, for most simple calls parenthesis are left out. i
+ 371539 [ninja@sl ph ] Right.
| 371542 [ken.egervari] In the case of the sqrt line, those parenthesis are not required, and
| + 371545 [cwdinfo@gm i] Is it really productive to compare the use of punctuators in Ruby with =
| + 371546 [cmdjackryan@] And the Ruby parser should actually warn you about the ambiguity. The
| | + 371550 [ken.egervari] On Oct 11, 2:21=A0am, Phillip Gawlowski <cmdjackr...@googlemail.com>
| | | + 371564 [cmdjackryan@] [snip Scala stuff]
| | | + 371607 [ninja@sl ph ] For what it's worth, this is also the case for most operators in Ruby, it's
| | + 371612 [cbciv@ya oo ] Not entirely.  There's a difference in precedence that might be
| | + 371826 [code@ap th o] Only well-written, readable Perl is particularly readable, even to a
| |   371830 [cmdjackryan@] In my opinion, parentheses should be used the way they are used in
| + 371547 [josh.cheek@g] Same, though there are some prominent people who disagree (Aaron Patterson).
|   371551 [ken.egervari] at
|   371553 [josh.cheek@g] You really come across like the kind of person who goes to Japan and says
+ 371541 [scott@ai ru ] For starters - http://en.wikipedia.org/wiki/TMTOWTDI
| 371543 [devguy.ca@gm] good one!
+ 371566 [fxn@ha hr f.] * parentheses around parameters in method definitions, and around
+ 371613 [tony.arcieri] For the most part dropping optional parens as much as possible is the
+ 371747 [code@ap th o] "Parenthesis" is singular.  "Parentheses" is plural.  The second sentence

tkri
371535 [devguy.ca@gm] does anyone have this working?
371770 [rogerpack200] appears you don't have some "ruby tk" package or other installed?

Testing for subarrays
371552 [michel@de az] I want to check whether a given array contains a given subarray and
371555 [jgabrielygal] ray
+ 371560 [michel@de az] Yes !
+ 371561 [dblack@ru yp] ...
  371567 [michel@de az] Comparing with my original proposal, a side question is whether using
  371568 [michel@de az] sub("that", "than"), sorry

Some newbie questions - bare with me ;)
371554 [ken.egervari] Question 1
+ 371556 [w_a_x_man@ya] You should have written "bear with me".
+ 371557 [jgabrielygal] It's a Symbol.
| 371562 [ken.egervari] Ah, thanks for all of those answers. It helps very much. I didn't know
| 371565 [shortcutter@] But please note that #== in Ruby is not the same as == in Java.
+ 371563 [stefano.croc] It is a Symbol. Symbols are sequences of characters with the property that

bug in flog ?
371558 [michel@de az] Minimal case : bug appears when adding this two lines
371588 [armageddon00] I'm quite incredulous that someone else has so recently noticed such a

Install Hpricot gem failure
371569 [flebber.crue] I am trying to install Hpricot but receive a build tools error from
+ 371572 [jeremy@bo p.] From the look of things, nokogiri installed successfully because a
+ 371576 [luislavena@g] Luis Lavena

Can DRbUndumped be disabled for certain return types?
371570 [josh.ncsu@gm] I have server model classes that definitely need DRbUndumped.  Except
+ 371579 [joelvanderwe] DRb.start_service
| 371630 [shortcutter@] ay
| + 371666 [joelvanderwe] Yes it is necessary, but no, I don't think that's what he wants.
| | + 371705 [shortcutter@] Of course you are right!  I an sorry for the (my) confusion.  I just
| | + 371706 [shortcutter@] Of course you are right!  I an sorry for the (my) confusion.  I just
| | + 371707 [shortcutter@] Of course you are right!  I an sorry for the (my) confusion.  I just
| + 371672 [b.candler@po] The response is a single object, and DRb just Marshals it to get a
|   371683 [joelvanderwe] Good to know about, thanks!
+ 371583 [b.candler@po] You mean, you want your objects to be DRbUndumped, except when you return an array of them?
+ 371587 [b.candler@po] def initialize
threads.html
top