377235-378537 subjects 377646-379916

Hidding debug messages
377443 [fuksito@gm i] I`m writing ruby console app, it uses some Rails gems, and there is a
377459 [kedar.mhaswa] Can you check what your RUBYOPT environment variable contains? If it

Problem with GEM configuration
377446 [zortag@rc .c] I've ben running Ruby and Gem for a few years without any problems until
+ 377448 [luislavena@g] can you try "gem env" ?
+ 377452 [zortag@rc .c] Thanks for the response.  From "gem env" ...
+ 377454 [zortag@rc .c] Thanks, problem is now fixed.  It was your last suggestion, that is the

General Ruby Object Oriented
377455 [jcarter@le p] I'm a newbie to Ruby (hmm... rhymes) and to object oriented programming
+ 377456 [jcarter@le p] I'll answer my own question (sort of ...).  This configuration for
+ 377457 [josh.cheek@g] This should be instance_eval (with an underscore)
+ 377463 [jcarter@le p] Awesome!  That did the trick.  Thanks

matrix: exchange rows + exchange columns
377458 [bomastudio@g] class Matrix

[ANN] test-loop 5.0.3
377460 [sunaku@gm il] test-loop - Continuous testing for Ruby with fork/eval

Newbie moving from other language - simple inline Rails conditional
377461 [peter.bethke] I'm moving to Ruby from another language and I'm working through the basics by altering an existing Rails project. One of the basic things I'd like to do is to highlight a link for example with the css id "current" when the current url matches a certain string.
+ 377462 [gwtmp01@ma .] basics by altering an existing Rails project. One of the basic things =
+ 377596 [Gennady.Byst] cs by altering an existing Rails project. One of the basic things I'd like =
  377598 [ruby@ur ew l] Do you need to call 'render' at all, because you are using already an

How to call a method from within a module or class.
377465 [cameronjc200] I really love Ruby but there are some concepts that I'm having a hard
+ 377467 [b.candler@po] What you've defined is an instance method (which would be available if
+ 377470 [cameronjc200] Thanks.  That worked.  I knew it was something simple.

IO from text file
377469 [macentricrub] New to Ruby
+ 377479 [driodeiros@g] Print the numbers of elements in lines. Most likely you have two blank line=
+ 377481 [jeremy@bo p.] You need to use double quotes rather than single quotes here.  Single
| 377512 [shortcutter@] Note also that in this particular string evaluation is completely
+ 377515 [macentricrub] Thanks for the excellent advice as I now have the correct information
  377521 [shortcutter@] The format of that file does not really matter - all these are proper

to use AR or not?
377472 [cameronjc200] Hmmm I've been scratching my head at this for a little while and maybe

Another Basic Ruby Question
377474 [jcarter@le p] Within the Class I define things which I would expect to be Global.
377505 [jgabrielygal] class Subroutines

writing on yaml file
377476 [niezam54@ho ] Is it possible for me to write on existing yaml file (i.e add contents
+ 377493 [jeremy@bo p.] The standard library defines the YAML class which can parse and emit
| 377520 [sutniuq@gm .] You can use the YAML module more or less the same way as Marshal,
+ 377566 [niezam54@ho ] Thanks for the post!!
+ 377568 [niezam54@ho ] convert_yaml = YAML::load_file('nizam.yaml')
+ 377569 [niezam54@ho ] convert_yaml = YAML::load_file('nizam.yaml')
| 377572 [jeremy@bo p.] `[]': can't convert String into Integer (TypeError)
+ 377573 [niezam54@ho ] Thanks for the post. I am able to solve the problem and the error
  400275 [lists@ru y- ] My question may not be exactly related to this question but quite

dynamic drop down list
377478 [danthom1000@] I'm trying to make a drop down list from an array.  For now, just hard
377508 [faraohh@gm i] <% menus_list =3D [["name1", "value1"], ["name2", "value2"], ["name3",

[ANN] midiator 0.4.0 Released
377489 [ben@bl yt in] midiator version 0.4.0 has been released!
377501 [botpena@gm i] will this run on 1.9?
377502 [ben@bl yt in] Sadly, it will not. Maintaining compatibility with both 1.8 and 1.9
377518 [sutniuq@gm .] If you're missing DL::Importable, it has been renamed to DL::Importer.
377532 [ben@bl yt in] I'll check again, but I believe there have been other changes in DL as
377567 [botpena@gm i] kind regards -botp
377636 [jim.menard@g] ...and the case of the first letter of each method in the interface. I
+ 377637 [jim.menard@g] One more caveat on my fork: I only played with the core_midi driver
+ 377649 [botpena@gm i] wow that passes all the examples.
+ 377686 [ben@bl yt in] First off, thank you for doing the legwork to get things running in 1.9.

net-http-persistent 1.5 Released
377495 [drbrain@se m] net-http-persistent version 1.5 has been released!

Re: to use AR or not? (table defined in code)
377507 [b.candler@po] activerecord-tableless won't give you *any* searching functionality.
+ 377519 [cameronjc200] Wow you've given me a lot to of options to consider!
| 377544 [b.candler@po] OK, that's a pretty small dataset.
+ 377534 [cameronjc200] Hmmm after some digging I found Struct.  How different is that from

Rails: Problem with test-environment and mysql2 database
377510 [ilikerubies@] this is the first time I am posting here, so please be gentle ;)
+ 377513 [b.candler@po] Sorry, but you're on the wrong mailing list. This one is for Ruby (the
+ 377514 [peter@va de ] Could it be that in the "test" section of database.yml you have a TAB
  377517 [ilikerubies@] Thanks a lot! That helped me to nail down the problem -

Coercion in Ruby
377523 [zach.dennis@] Ruby. It's not something I've seen covered often so I thought I'd
+ 377524 [josh.cheek@g] Thanks for sharing, very well done.
+ 377525 [shortcutter@] In case you weren't aware: I covered this thoroughly a while ago when
| 377526 [zach.dennis@] Thanks Robert, I hadn't seen your post before. Will add to my reader docket!
+ 377550 [tony.arcieri] if other.is_a? TimeInterval
  377576 [ninja@sl ph ] if other.kind_of? TimeInterval
  + 377579 [tony.arcieri] First, in TimeInterval, alias_method :to_int, :value
  | 377581 [ninja@sl ph ] with how strong or well-informed I am about the topic. I actually didn't know
  + 377599 [mentionuse@g] Am I missing something here? I don't see how this is in keeping with the
    377605 [ninja@sl ph ] Apparently so. Sorry for the noise...

Issues with Time.parse
377527 [jens.finnas@] I just started working my way around web scraping with Ruby and I  just
+ 377529 [jgabrielygal] }/)
| 377533 [shortcutter@] 2}/)
+ 377542 [jens.finnas@] Cheers guys. Runs nicely now.

ERROR: while executing gem (Errno::ENOENT)
377528 [sbierman@gm ] Just installed ruby on Windows 7.  This is the error I get while running
+ 377530 [cmdjackryan@] You shouldn't update the built-in RubyGems, anyway.
+ 377531 [sutniuq@gm .] You *did* read the prominent message on rubygems.org and Rubygem's

link to .erb file, from .erb file
377535 [danthom1000@] I'm new to web development and Ruby.  In an erb file, I need to provide
377539 [steve@st ve ] You're thinking too hard.
377541 [danthom1000@] Thank you.
377543 [sutniuq@gm .] This has nothing to do with the view, but how your Sinatra app processes
377553 [danthom1000@] Ahh, I was starting to head in that direction but not quite getting it. Your post helped a ton.  Thank you, Marvin!!

Matrix Referencing
377536 [jcarter@le p] wvp =
+ 377537 [tokenshift@g] "undefined method `-' for nil:NilClass" means that the operand to the
+ 377538 [jcarter@le p] starting index 1, while Ruby has starting index 0.  I overran my index.

Fwd: Fml status report (ruby-talk ML)
377540 [jose@st t. c] I'm unable to complete my unsubscription from this list.

packing large array of mixed native types
377545 [keithroe@gm ] I have an array in the form [ uchar, float, float, float, uchar,
377549 [ruby@ur ew l] Why don't you read 4 elements at a time, pack them and write them in an
377551 [keithroe@gm ] I will try this.  thanks

`require': no such file to load -- rubygems (LoadError)
377546 [bhupendra.mi] I have installed ruby 1.9.2p136 (2010-12-25 revision 30365)
+ 377556 [drbrain@se m] If you had to symlink ruby I think you forgot to run `make install`.
+ 377580 [bhupendra.mi] Thank you very much. This works perfectly fine with me.

ruby treatment of method defs
377547 [byrnejb@ha t] def g=( value )
+ 377555 [ryand-ruby@z] fundamentally
+ 377559 [b.candler@po] g = 123 is an assignment to a local variable. (Local variables are not

WatirSplash 1.0.0 Released
377552 [jarmo.p@gm i] I'm happy to announce that WatirSplash 1.0.0 [1] got finally released.
377638 [redstun@gm i] Looks interesting, I'll definitely try it.

rhtml and apache trouble
377554 [mitultiwari@] I am trying to run embedded ruby inside rhtml.
+ 377557 [justincollin] Your .rhtml files shouldn't be in cgi-bin/, they should be in
| 377560 [mitultiwari@] Thanks Justin for your comments!
| 377571 [justincollin] Are you using http://localhost/test.rhtml as the URL?
| 377577 [mitultiwari@] Yes, http://localhost/test.rhtml
+ 377582 [b.candler@po] One problem is that you must not output a blank line before the HTTP

how to build gem whose dependencies depend of the platform?
377558 [jarmo.p@gm i] I need to build a gem whose dependencies are dependent of the platform
377561 [luislavena@g] This one is the best approach. Have that clearly in the documentation
377719 [jarmo.p@gm i] 1) gem install mylib
+ 377723 [uwe@ku os h.] I have solved this by making the gem depend on the "bundler" gem, and then put the gem dependecies into a Gemfile, and run the equivalent of "bundle install" as a post-install script.  This takes care of everything.  The only thing I am missing is that the dependencies are visible when inspecting the gem.
| 377727 [luislavena@g] n put the gem dependecies into a Gemfile, and run the equivalent of "bundle=
| 377747 [uwe@ku os h.] ...
| 377749 [luislavena@g] tep.
| 377757 [uwe@ku os h.] True.  I consider this a flaw and would very much like to solve that, too.
+ 377728 [luislavena@g] You can display a post_install message after you installed "mylib"

Problem: use case stmt on object's class in simple test
377562 [RichardDummy] The following is a toy abstract from an app I'm writing.
377563 [astounding@g] user@host:/path$ irb
377570 [RichardDummy] =3D

Ruby app through Heroku
377565 [atul.mathur3] I am trying to build a basic Ruby app on Twilio and deploying through

Adding contents on yaml file without overwriting actual contents
377574 [niezam54@ho ] convert_yaml = YAML::load_file('nizam.yaml')
+ 377578 [jeremy@bo p.] No, YAML.dump is doing what it should.  The problem is that your code
| 377587 [shortcutter@] Also, Nizam, it would help the community enormously if you posted
+ 377632 [niezam54@ho ] Jeremy, thanks for the post. Actually the key is '<<' which is used to
  377657 [shortcutter@] Well, actually different problems _should_ go to different threads but

Deploying "double-clickable" ruby scripts on OSX
377585 [dantes990@ya] I have a menu driven ruby script to copy some files from servers to
377586 [fxn@ha hr f.] Instead of the cwd you seem to need File.dirname(__FILE__).
377588 [dantes990@ya] That works and is a very simple change, thank you!!

Install Settings after Paperclipped
377594 [transfire@gm] I installed the Paperclipped extension, only to read after the fact
377595 [transfire@gm] Please ignore --sent to the wrong mailing list.

which Ruby is in use?
377600 [hassan.schro] How can I tell from within a running program which interpreter is being
+ 377601 [steve@st ve ] ruby-1.9.2-p0 > RUBY_DESCRIPTION
| 377602 [hassan.schro] Ah, that's it -- I know I've seen that before, but couldn't dredge it out
| + 377618 [mentionuse@g] You might find Object.constants.grep(/RUBY/) useful to remind yourself.
| | 377619 [hassan.schro] D'oh! Thanks for the reminder. Apparently I needed a lot more coffee
| + 377625 [steve@st ve ] irb
+ 377604 [sutniuq@gm .] The RUBY_ENGINE constant should define this, but I'm not sure wheather
| 377616 [hassan.schro] That doesn't appear to be defined in at least this Mac's MRI 1.8.7.
+ 377622 [josh.cheek@g] If you're using RVM, there is also some good stuff in the ENV hash.

Modules acting up after relocating code
377603 [walle.sthlm@] I'm having a strange problem with some of my required modules/gems.
377662 [shortcutter@] We need more context, at least stack traces and probably also how you
377682 [walle.sthlm@] Hey,

Generate randon string of fixed length (in bytes)
377606 [ibc@al ax ne] def gen_token(len=6)
377607 [ibc@al ax ne] In fact, what I need is to generate a Base64 encoded string of a fixed

performance question
377608 [klochner@gm ] sorry for the cross-post from RoR, but I actually think this is more
377610 [cremes.devli] Not every runtime we behave the same. You didn't mention which Ruby runtime you are using (MRI 1.8.x, MRI 1.9.x, JRuby 1.?, Rubinius, etc.).
377614 [klochner@gm ] me you are using
377667 [wyhaines@gm ] Garbage collection.
377677 [tom.enebo@gm] I totally agree with you Kirk...but...
377679 [tom.enebo@gm] Sorry Kirk you were probably specifically talking about Ruby impls
377680 [wyhaines@gm ] Yeah, I should have worded it more specifically.  I was talking about
377708 [klochner@gm ] Thanks a ton guys, this is all great info.

why is overloading invalid in ruby.
377609 [flethuseo@gm] I don't understand why when I try to overload I get an error. Can I
+ 377611 [wagner.andre] method with that name, it replaces it. So your class is left with only one
+ 377612 [ben@bl yt in] Ruby does not support method overloading. Searching the list archives
| 377658 [shortcutter@] For example the recent thread
| 377678 [headius@he d] FWIW, I'd love for Ruby to support operator overloading. JRuby
| 377681 [mentionuse@g] Not very quackish.
| + 377685 [josh.cheek@g] Well, you could reinterpret "type driven" to be "respond_to driven". Almost
| + 377687 [headius@he d] case obj
| + 377710 [Ruby@Go gl M] But it's used all over the core and standard libraries.
|   377714 [echristopher] Whenever the overloading topic comes up, I wonder about what the
|   + 377721 [Ruby@Go gl M] AFAIK, they are on the wishlist for Ruby 2.0, but I don't think there
|   | 377755 [headius@he d] I don't believe that's the case, and if I remember right Matz actually
|   + 377756 [headius@he d] Laurent can correct me if I'm wrong, but I don't think ObjC's syntax
|     377782 [Ruby@Go gl M] Yes. Objective-C inherits its syntax from Smalltalk, which just has
+ 377613 [stefano.croc] Ruby doesn't support method overloading. What your code does is giving three
+ 377615 [rubfor@re it] I guess the answer to your question is "Because you don't need to"
+ 377620 [flethuseo@gm] Ah that's too bad... I knew I could put some default values for x and y
| + 377624 [jgabrielygal] If they are so completely different, maybe the name of the method
| + 377631 [ninja@sl ph ] If they're not differentiated by different values, how were you expecting
|   377639 [flethuseo@gm] Ok.. I didn't want to post so much code but you asked for it. I am trying to read a file, with a number of different methods. The methods allow you to interpret the file as an input and output matrices, input only or both but with only a number of rows.
|   + 377641 [botpena@gm i] ok, you've defined the class, thanks.
|   + 377643 [brabuhr@gm i] Infinity =3D 1.0/0
|   + 377644 [wishdev@gm i] Good Evening,
|   + 377651 [ninja@sl ph ] Yeah, there's a lot of duplicate stuff there. Also, why are you doing this
+ 377621 [josh.cheek@g] Ruby methods don't really have signatures, so overloading would be quite
+ 377627 [rubfor@re it] Just to clarify what I was proposing (I am prepared to be corrected by
+ 377640 [botpena@gm i] sorry no overloading in ruby. overloading gives fixed/absolute power
+ 377716 [transfire@gm] ...
+ 377763 [shadowfirebi] So far I don't believe I've heard anyone make the obvious case against method overloading -- that unless done very carefully indeed, it makes the code much, much more difficult to read.  One method does one job is the sane way to go, thanks.
  + 377766 [shortcutter@] thod overloading -- that unless done very carefully indeed, it makes the co=
  + 377778 [gwtmp01@ma .] of duck typing.  Duck typing rules out method overloading, because =
    377787 [tom.enebo@gm] f duck typing. =A0Duck typing rules out method overloading, because paramet=
    377788 [headius@he d] I'd also add that in JRuby, if the source arity matches the target
    377811 [gwtmp01@ma .] Maybe I'm overlooking something but I wasn't suggesting that you don't need to calculate arity but instead was pointing out that you can't just calculate it at parse time but sometimes need to calculate it at call time.
    + 377841 [e148759@bs o] That”Ēs neat. Thanks!
    + 377845 [tom.enebo@gm] n the number of parameters but not their type.

HELP! New to Ruby and need to debug for work! Chomp! Error
377623 [wdblackman@b] I programmed years before with .Net, Java, etc. and haven't had any
+ 377626 [sduncan@we a] So the gets called on your socket in readline is returning nil instead
+ 377628 [wdblackman@b] Thanks for replying Sam.  I just tried it and got the same error
| 377629 [sduncan@we a] Have you got the debug flag turned on, and does it output anything to
| 377633 [josh.cheek@g] nil.to_s returns an empty string, you probably want %p in your format string
+ 377630 [cremes.devli] The call to "f.gets" is trying to read the next string from the IO object (in this case it's a TCPSocket). The docs say you'll get nil when you hit EOF. You can't call #chomp (or most other methods) on NilClass without it throwing up its hands and exiting.
+ 377642 [botpena@gm i] refine your code.
  377661 [shortcutter@] def send_mail(to, subj, msg, filename="<EMPTY>")

Obtaining specific .csv data (one data at a time)
377634 [niezam54@ho ] class Target <
+ 377635 [josh.cheek@g] This bit here is a little cumbersome, it could probably be cleaned up like
+ 377791 [niezam54@ho ] Thanks for the post. Problem solved. But i have one little question to
| 377795 [josh.cheek@g] In regular expressions, the period will match any character. So you need to
+ 377796 [niezam54@ho ] THANKS!!
+ 377907 [niezam54@ho ] I tried using the method above (/1\.[a-z]/)and it still give me the same
  377923 [brabuhr@gm i] There's a guide at the bottom with information on the syntax.

If you had the choice between Ruby & Groovy
377645 [sit1way@ho m] Hey All.
+ 377648 [mark@wi ho t] It depends on what you're using. Ruby on Rails per example can run in
+ 377659 [shortcutter@] Not out of the box.  As Mark has explained there are environments that
+ 377673 [wyhaines@gm ] Don't conflate Ruby with any particular web framework written using Ruby.