325776-412266

325546-343833 subjects 325974-333106

[ANN] rttool-1.0.3
325776 [rubikitch@ru] == Abstract

how to find the position of each match within a string
325777 [chen_li3@ya ] I have  a small script to find a match. If a match is found I need to
325779 [dblack@ru yp] irb(main):003:0> "ello-hello".scan('e') do |match|
+ 325795 [albertschlef] Interesting. Does that mean that String#scan() converts a String
| 325796 [radek.bulat@] Yes it does, even if it search fixed-size string.
| 325799 [albertschlef] I'm shocked. Why does it do this? (this conversion)
+ 325818 [chen_li3@ya ] Thanks.

secure client api for a web service
325778 [crashoverrid] I have to make a client api using ruby, to a java web service.
325800 [albertschlef] I'm not familiar with java and the technologies you mentioned, but I'd
325965 [crashoverrid] When I am trying to connect to the web service, I am getting

regural expression with not condition.
325780 [vamsikrishna] i'm trying validate the format which doesn't consist of an empty string
+ 325809 [yaserbuntu@g] How about /^['"](.+)['"]$/.
+ 325821 [b.candler@po] What do you mean: the string may contain spaces, but must not start or
+ 325824 [b.candler@po] P.S. WARNING!! Never use ^ and $ in regular expressions which validate

how to require more than one thing from the command line
325781 [rogerpack200] Is there a way to do this?
328172 [rogerpack200] Seems this is a gems quirk of some type.
328177 [bbxx789_05ss] r1test.rb
+ 328178 [bbxx789_05ss] $ ruby -e 'x=10;' r1test.rb
| 328186 [bbxx789_05ss] r1test.rb
| 328217 [rogerpack200] Yeah pickaxe is wrong there, I'm thinking :)
+ 328181 [nobu@ru y- a] require separates the scope, so local variables defined outside
  328185 [bbxx789_05ss] 1) require?  Where, what, when?
  328193 [nobu@ru y- a] Sorry, it was load.

gem thought
325782 [rogerpack200] I noticed how convenient it is to use debgem, I am wondering if it would
325783 [badboy@he rt] if apt would be the only packet manager out there in the *nix-World you
325784 [rogerpack200] My assumption was that between apt-get and yum you'd have covered your
+ 325789 [badboy@he rt] but that would mean gem must know about your installed packet manager
+ 325792 [gregory.t.br] Technical Blaag at: http://blog.majesticseacreature.com
  325806 [rogerpack200] which are probably run as root during install.
  325811 [m.fellinger@] Which is exactly why I never run rubygems with any significant permissions.

[RedCloth] Adding a class to a link with Textile
325786 [pedrolito@la] <a class='first' href=...>
325787 [pedrolito@la] Actually it does work, I made a typo during my tests.

Scope resolution operator
325797 [rabbitblue@g] (The code I will demonstrate is Rails-based, but the question is
325808 [stefano.croc] According to "The Ruby Programming Language", ::Something is a shortcut for
+ 325810 [rabbitblue@g] You may not be familiar with Rails but you certainly know Ruby. That is
+ 325947 [shortcutter@] ARGF
+ 326063 [overlord@gm ] ,----

Not sure why this is failing, barring a typo:
325801 [alex.m.mcphe] class Animal
+ 325804 [mguterl@gm i] Your method is named get_color, you're trying to call the method
+ 325805 [severus@po t] No.

[ANN] freeVikings 0.8
325803 [severus@po t] == What is it?

Question about BlankSlate.reveal
325812 [gregory.t.br] I've been working on a chapter for "Ruby Best Practices"[0] about the
325876 [shortcutter@] From what you write caching a bound method seems a bad idea because it
+ 325886 [gregory.t.br] I think you missed that the local variable was at the class level.
| 325900 [shortcutter@] Right, you stated so in the text and then I got confused by
| + 325904 [dblack@ru yp] Sorry -- I posted my reply to your earlier post without having noticed
| + 325905 [gregory.t.br] Technical Blaag at: http://blog.majesticseacreature.com
| + 325906 [gregory.t.br] Cool.  This is what I'm going to go with in my chapter.  I emailed Jim
+ 325903 [dblack@ru yp] Let's say you do BasicSlate.reveal(:meth). Then you do slate.meth. At

Listing installed gems
325813 [shiloayalon@] I'm trying to find out if there's a simple way to list all the gems I
325814 [stefano.croc] Doesn't
325815 [shiloayalon@] Bingo, must have missed that in the gem --help (yup, feeling dumb right
325847 [tomcloyd@co ] technically, the correct command, I believe is "gem list --local" or
325848 [Rob@Ag le on] $ gem list --local ra
+ 325850 [tomcloyd@co ] * gem list -l ra => lists all local gems BEGINNING with "ra"
+ 325864 [luc@ho k- on] % gem list -l ".*ra"
  325875 [Rob@Ag le on] Good to know!  I like when my own advice comes back even better!

How to pop up a Download Window
325816 [saurav@ci he] I have to show window as like you got on click of save(or by pressing of
325820 [b.candler@po] This is not a Ruby question, but it's something I was trying to do
325958 [richard.conr] This is a problem I faced recently enough. The proper solution is to set

unalias a method?
325817 [promos@bu ch] I needed to alias a method (alias_method) to change its behavior during
+ 325819 [mike.gold.44] class Foo
| 325840 [promos@bu ch] Thanks Mike.  Perhaps that's what I said, but that's not what I meant...
| + 325844 [gregory.t.br] Hopefully this does what you'd expect.  -greg
| | 325851 [promos@bu ch] Hey Greg!  That works great from Terminal - thanks.
| + 325854 [mike.gold.44] In that case, maybe push/pop would make things easier.
|   325856 [promos@bu ch] Didn't work.
|   325857 [mike.gold.44] The |&block| syntax is supported on 1.8.7+.  Rewriting MethodStack for
|   325858 [promos@bu ch] I had to laugh out loud on that one.  Thanks Mike!
|   325881 [mike.gold.44] My last comment sounded more glib than intended.  Since I've already
+ 325846 [ryand-ruby@z] alias the old method back. A really messy example of this is heckle

unsubscribe my email address from all ruby forums
325825 [wlh1074@ya o] unsubscribe my email address from all ruby forums

Re: Question about BlankSlate.reveal [SOLVED]
325826 [gregory.t.br] As it turns out, I was able to stop the method from binding to a
326016 [shortcutter@] Greg, thanks for sharing the result of your investigation!

[ANN] Inochi 0.2.0
325828 [ snk@gn .o g] Inochi 0.2.0

[ANN] Rumai 2.0.1
325830 [ snk@gn .o g] Rumai 2.0.1

How can I get the arguments passed to the caller.
325832 [stefan.kanev] Hey guys.
+ 325833 [pjb@in or at] I don't think this is possible.
+ 325834 [jcoglan@go g] I think the closest you're going to get is for the calling function to pass
  + 325843 [stefan.kanev] So, suppose I want to get evil and go dig into frames and so on. I've seen
  | 325849 [robert.dober] Depends, for methods with *args and optional arguments you have
  + 325865 [b.candler@po] In which case, it might as well just pass its args instead :-)
    325953 [stefan.kanev] Thanks for the advice. I would have never had thought of something as
    325963 [shortcutter@] IMHO you can't because the current value is only known by method
    326164 [stefan.kanev] And I have to override Array#each. I'll also need to override #map, #select

creating  facebook
325835 [isitcbh@ya o] what about creating facebook with rails !
+ 325836 [isitcbh@ya o] what about creating Google map with rails !
| 325837 [isitcbh@ya o] what about creating website forum with rails !
| 325838 [isitcbh@ya o] Posted via http://www.ruby-forum.com/.
| 325842 [iwasinnamukn] well go and do it then...
| 325845 [ryand-ruby@z] so you have a sig about top posting yet don't know not to feed the
+ 325839 [badboy@he rt] what about creating Youtube with rails ?!
+ 325859 [alex@de et m] What about destroying facebook with ruby? That would be so much cooler.

Whats wrong with this script?
325853 [tommy.nordgr] #!/usr/bin/ruby
325855 [sepp2k@go gl] HTH,
325863 [overlord@gm ] That seems to be another reason not to use global variables.

[ANN] Mr Bones 2.3.0 (Calcaneus)
325860 [tim.pease@gm] Mr Bones version 2.3.0

[ANN] logging 0.9.5
325861 [tim.pease@gm] logging version 0.9.5
325862 [severus@po t] It would be nice to see comparison of Logging and Log4r.
325951 [tim.pease@gm] /me makes mental note to write up a blog post ... after I create the =20
+ 325954 [rupert@ru es] ...
+ 325975 [tomcloyd@co ] OMG, Tim, you're right! And it's a jewel. I use it all the time -

Need help for Ruby DBI and PostgreSQl
325870 [pujari.manis] I am trying to access aPostgreSQL database from a Ruby program.
+ 325872 [raasdnil@gm ] require returns false when the library has already been loaded.
| 325874 [pujari.manis] Thanks Mikel,
| 325877 [overlord@gm ] That's strange. Maybe the keyboard on that computer is broken. Try
+ 325879 [b.candler@po] You need to show the exact error message you got.
  325883 [pujari.manis] Try 'ruby setup.rb --help' for detailed usage.
  325899 [b.candler@po] You didn't show the command line you typed. But the following works just
  325948 [pujari.manis] Thanks Brian.
  325955 [b.candler@po] * your operating system version, your ruby version, and the dbi version
  326017 [pujari.manis] problem.
  326018 [b.candler@po] Thank you. The problem is simply that you were following information on
  326032 [pujari.manis] Thanks Brian, for all the information.
  326037 [b.candler@po] Perhaps in different locations, but otherwise it should all work the
  326050 [pujari.manis] thanks a lot for the information

xml
325871 [kd_harish@ya] i am new ruby on rails n i am currently working on xml with Ruby on
325880 [b.candler@po] Problems with Rails and/or ActiveRecord would best be asked on a Rails
325950 [kd_harish@ya] Sir,
325957 [b.candler@po] No, that's wrong, and it explains why your data is getting serialized as
326337 [jarmo.p@gm i] You are correct. I just had similar problem as OT.

minimal ruby install
325882 [rfiorentino@] I submitted a similar request over on the rails forum, but feel this is
325885 [m.fellinger@] minimal footprint and rails?
325887 [rfiorentino@] Right...good question. At a minimum I need to support DB access and
325890 [rmagick@gm i] I love Ruby, but for embedded applications you might check out Lua. I

net-smtp timeout error
325888 [djberg96@gm ] Ruby 1.8.6-p114
325889 [usenet@a1 .f] nc mailhost.foo.com 25
325915 [djberg96@gm ] It turns out there was a bad, hard coded mailhost value in the

non-invasive templating solutions in ruby?
325893 [metaperl@gm ] would like to know which dynamic html generation systems exist in Ruby
+ 325894 [phlip2005@gm] Everyone uses eRB there. Except those who use HAML, or certain other systems,
| + 325896 [metaperl@gm ] t's CSS
| + 325897 [metaperl@gm ] This was a good review of ruby templates -
+ 325898 [b.candler@po] Amrita works like that. I haven't used it for a long time, and it

How do I use Erubis?
325901 [jonsdenni@gm] I have been using eruby for embedded ruby in html, and I am moving to a
325929 [b.candler@po] To paraphrase: you are asking "how to I get my webserver to use erubis

Page crawling and URL grabbing
325910 [leahy16@gm i] Hey guys,
+ 325928 [jgabrielygal] Generally speaking, regular expressions are not the best tool to extract
+ 325931 [trednu@gm il] Try Mechanize.
  325988 [leahy16@gm i] That's great, or it sounds great. Is there any documentation aside from
  325990 [lyon2003@ly ] mechanize is very easy and intuitive ... you could basically learn to

Conventions in ruby and the principle of least surprise
325911 [einarmagnus@] library that so far has had me surprised. I know Matz doesn't say that
+ 325912 [matz@ru y- a] Correct.
| 326340 [julian@co et] Awesome :) perhaps these little gems of what certain things mean as a
+ 325926 [b.candler@po] save_block(:say_hello) {
  325934 [d_rems@ya oo] My convention is use {} in oneliners. In all other examples I use
  325977 [ryand-ruby@z] {} for block values I care about (think map), do/end for regular block
  + 325991 [mike.gold.44] funcs = []
  | 326095 [phlip2005@gm] Curiously, Ruby departs with 40 years of Structural Programming tradition - the
  + 326591 [rick.denatal] Yes, it's the "I care about' that matters, a subtle distinction to the

passing hash as arguments
325916 [jason.lillyw] Is this the best way (though contrived) to use a hash as an argument in
325917 [micathom@gm ] def state_name_age(feeling, info=3D{})
412229 [lists@ru y- ] ## Make the hash
412266 [tamouse.list] =3D>

Help on Directory Iteration
325918 [revathy.p@an] now in my form i have given date field and search button.
+ 325919 [shortcutter@] Dir.foreach(File.join("ChatHistory",f)) do |p|
| + 325920 [revathy.p@an] Thanks for the timely reply
| | 325932 [revathy.p@an] Posted via http://www.ruby-forum.com/.
| | 325980 [shortcutter@] remember.guy do |as, often| as.you_can - without end
| + 325933 [revathy.p@an] if params[:first_name].blank? and params[:second_name].blank? and
+ 325923 [botp@de mo t] #   Dir.foreach("ChatHistory") do |f|
+ 325936 [b.candler@po] You can get a list of all files and subdirectories under a subdirectory

nokogirl on ubuntu: failed to build gem native extension
325921 [edrd.dantes@] I want to give a try to nokogiri with mechanize as it seems to have
+ 325922 [radek.bulat@] Search and install package named ruby-dev. Notice also that it's
| 337604 [gheorghiua@g] Have similar problem and tried to install ruby-dev but it is not in my
| + 337606 [charles.john] Cheers--
| | 337719 [gheorghiua@g] Tried it and also followed this site http://whomwah.com/tag/howto/ for
| + 337785 [drbrain@se m] $ gem list -r nokogir
|   337796 [gheorghiua@g] nokogiri (1.2.3)
|   337799 [drbrain@se m] ...
|   337818 [mike.dalessi] 2009/5/28 Eric Hodel <drbrain@segment7.net>
|   337833 [gheorghiua@g] LOL -with tears in my eyes! Worked on a wget today, with the help of my
|   338111 [gheorghiua@g] The issue on my installation was that libxml2 appeared in my /usr/lib64
+ 377731 [reza.naq@gm ] Could you please tell me WHICH config file you changed or how? I'm
  377777 [mike.dalessi] Greetings and salutations!

A test suite for DRb
325930 [dido.sevilla] I've been working on a version of distributed Ruby that makes use of

Name Extraction
325938 [revathy.p@an] i have following string
+ 325940 [tjnogueira@o] I think you can do this with regular expressions.
+ 325944 [jgabrielygal] irb(main):001:0> a = "jayabharathy@angleritech.com~Vs~kannan@angleritech.com"
+ 325946 [shortcutter@] Something like this can work, depends of course on the names that you

saving ActiveRecord/form changes
325952 [thewdata_sa@] Greetings everyone,
325956 [b.candler@po] I'm afraid the Rails mailing lists/groups are elsewhere. This is the

Ncurses: Take the input from certain spot?
325960 [tmcdowell@gm] I've set up a basic window that goes along the bottom of the term

problems with rake and sh
325962 [hunkybill@gm] I am using ssh to login to my Amazon EC2 server, and using a rake task
326074 [rogerpack200] maybe run it within bash or sh -c or so... [?]
326075 [hunkybill@gm] It does run fine in bash... the whole point for me is to use Ruby inside
326377 [jarmo.p@gm i] Maybe Net::SSH could help you: http://net-ssh.rubyforge.org/

A bug in Ruby regexp lib?
325966 [x11@ar ur z.] ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
325968 [tim@bu ly os] href=\"http://www.myspace.com/djmamania\">www.myspace.com/djmamania</a>
+ 325969 [tim@bu ly os] href=\"http://www.myspace.com/djmamania\">www.myspace.com/djmamania</a>
+ 325970 [x11@ar ur z.] Ah, thank you. It seems that Ruby is parsing that string after getting

read a ruby script like you would read a text file
325967 [mmc_collins@] I want to read each ruby script in a directory (btw there a hundreds of
325981 [shortcutter@] What do you mean by "read"?  Do you want to execute the Ruby code in
325982 [mmc_collins@] Thanks Robert,

Ruby interpreter not working
325971 [w.dresh@gm i] I think this problem will be best explained by simply showing you the
325972 [stefano.croc] Look closer at this.
326014 [lyon2003@ly ] I think Charles was being ironic , making fun of the python guys . It's
326026 [robert.dober] And I felt actually bad, adding the smiley, just to discover it was
326056 [rodrigo.berm] def new ...would be the "least surprise way" of doing it.

Re: [initialize keyword] Ruby interpreter not working
325973 [rodrigo.berm] I've come across into this mistake several times.
+ 325976 [tomcloyd@co ] Actually, English isn't all that easy for us English speakers either. If
| + 325978 [phlip2005@gm] Thank God the Brits have not foisted their phonetically incorrect 'initialise'
| | 326011 [martindemell] I must admit, I did that one a lot when I was learning Ruby. `init`
| + 325996 [robert.dober] This is really something ugly, biting me very often. Actually I
|   326009 [yaserbuntu@g] Nice.
|   326012 [robert.dober] That seems a good idea too. I guess it is important to let each tool
+ 325997 [tim@bu ly os] I don't suspect there are many languages that would create aliases by
+ 326003 [charles.nutt] Sure, how about we name it __init__
threads.html
top