243950-246192

243707-337158 subjects 244197-248251

How to take thumbnail of a website using Ruby?
243950 [h.dunnil@gm ] How could I take a screenshot of a web site using Ruby on a shared
+ 243960 [dan@fl en ra] I'd be surprised if the first step in the easiest way to do this wasn't
| 243975 [dangerwillro] What you need is not to take a picture exactly but rather than
| 243987 [kyleaschmitt] You could render it with links :) and no it's not just text only.
+ 243965 [a2800276@gm ] Not only do you need an X-Server to provide the libs to take
+ 243971 [swistak@ma l] well i'm working on scrpt that an do that, but you probably won't be able to

Trapping ESC key
243952 [rubycrazy@gm] ...
+ 243968 [ruby.hardwar] Will this do it?
| 243969 [rubycrazy@gm] ...
| 243992 [pit@ca it in] Change your operating system, or don't use threads with blocking
+ 244099 [botp@de mo t] # I am stuck and can't find a simple and portable way to trap

Exchange calendar to Ruby object. Please comment the code.
243961 [d_rems@ya oo] I have written this peace of code to extract data from Exchange calendar

Re: attr_protected macro
243963 [a2800276@gm ] Ruby comes with the `attr_accessor` family of functions built in to
244031 [martindemell] First a bit of background: ruby has no real 'compile' phase; it
+ 244038 [a2800276@gm ] <smartass>of the class Module, to be precise</smartass>
| 244070 [martindemell] I had a feeling I should've looked it up first :)
+ 244056 [B.Candler@po] Almost. It actually reads in and *parses* the whole file, start to end, and

Re: New "Ruby for Windows" Installer
243966 [david.a.r.ke] On Mar 6, 4:06 am, Lothar Scholz <mailingli...@scriptolutions.com>
+ 244023 [godzail@in i] I am new to Ruby and  I am interested in your installer (now I am using
+ 244097 [nightphotos@] On a clean Vista system, I installed ArachnoRuby 0.6.9 and your Ruby
  244101 [nightphotos@] Please ignore my report of the hang when I ran ruby from the command

How to convert a String to an Array?
243976 [rubycrazy@gm] ...
+ 243978 [farrel.lifso] irb(main):001:0> "hello world".split(//)
+ 243983 [peter@ru yr ] And what's the problem with that? Or do you want a different result?

Binding or executing a command with a TkOptionMenubutton
243984 [alex.decaria] I want my program to execute a command whenever a new selection is made
243997 [nagai@ai ky ] For example,

[ANN] HTMLEntities 4.0.0
243985 [pbattley@gm ] I wrapped up and released a new version of HTMLEntities last night.

Splitting A String
243986 [boss@ai bl d] 'a quick "brown fox" jumped "over the lazy" dog'
+ 243988 [frdrch@we .d] require 'csv'
| + 243990 [james@gr yp ] Wow, that's mighty clever.  I didn't even think of trying that.  Nice
| + 243994 [boss@ai bl d] Nice!
+ 243989 [satish.talim] ...
| + 243991 [james@gr yp ] Not quite the same.  Look again.  ;)
| + 243995 [frdrch@we .d] This was also my first idea, but
|   + 243996 [satish.talim] ...
|   + 244007 [kyleaschmitt] OK this was my answer, but it didn't quite work...
+ 243998 [fxn@ha hr f.] str = 'a quick "brown fox" jumped "over the lazy" dog'
| 243999 [fxn@ha hr f.] Heh, reading it I recalled there's a more specific idiom for that
| 244001 [fxn@ha hr f.] Sorry, that regexp was part of a test and got copied by accident. I
| 244002 [shortcutter@] irb(main):010:0> require 'enumerator'
+ 244000 [logancapaldo] #!/usr/bin/env ruby
+ 244003 [brendan.bald] ...
| 244004 [fxn@ha hr f.] Preserving part of the separator is a good trick, but the split
+ 244091 [louis.j.scor] Not a good solution by any means, but somebody might find it
+ 244103 [george.ogata] If you're looking for shell-quoting-like behavior, I actually think
  244302 [boss@ai bl d] Thanks for the pointer -- I didn't know about Shellwords.

Ruby 1.8.6 One-Click Installer
244006 [dejan.dimic@] Does somebody know when the Ruby 1.8.6 One-Click Installer will be
244187 [dave@dj so t] I too would like to know this ?
+ 244189 [vjoel@pa h. ] The OCI isn't the only way to go, though it may be worth waiting for.
| 244193 [znmeb@ce ma ] It's definitely worth waiting for!
+ 244199 [ml.chibbs@gm] ...
  244216 [sigma.kappa@] And it's available here: http://rubyforge.org/projects/rubyinstaller/
  244241 [rubynando@ya] I think you need to send an e-mail to webmaster@ruby-lang.org, may be
  244262 [dejan.dimic@] You are my heroes!

Capistrano/Rake integration is deprecated
244016 [encapsulin@g] I'm trying to include capistrano support into RoR application, as
244018 [Rob@Ag le on] It just means that the rake tasks for calling capistrano recipes is
244028 [encapsulin@g] On Mar 16, 7:39 pm, Rob Biedenharn <R...@AgileConsultingLLC.com>
244034 [Rob@Ag le on] Are you sure you have the subversion repository path correct?  Can

Newbie question about ActionController (I suppose) behavior
244021 [paulo@fl in ] ...
244120 [jan.svitok@g] search for metaprogramming, or class methods or singleton methods

The philosophy of failed pings
244022 [djberg96@gm ] I need some advice. I recently received a bug report for
+ 244029 [damnbigman@g] ...
+ 244085 [robert.dober] Normally I try to look it up myself, but right now I am a little bit
+ 244086 [gwtmp01@ma .] I'm not sure I understand.  Net::Ping::External#ping(host) was
  244100 [djberg96@gm ] Yes. In all of my past experiences when that happened there would be
  244117 [garbagecat10] ...
  246192 [djberg96@gm ] On Mar 17, 6:01 am, "Francis Cianfrocca" <garbageca...@gmail.com>

Re: Google Summer of Code (please forward)
244025 [mneumann@nt ] Is there a place where proposals are collected other than the thread on
244026 [mneumann@nt ] Is there a place where proposals are collected other than the thread on

Need feedback on improving Ruby code
244027 [bcparanj@gm ] require 'print_receipt'
244030 [frdrch@gm il] Beware the assert_* methods expect at first parameter the *expected*

Re: [Slightly OT] Case against ".*" regexp
244037 [shortcutter@] Not exactly.  But you should not use ".*" nested in another starred
+ 244039 [frdrch@gm il] Did you probably mean this thread?
| 244069 [robert.dober] Hmm I am not sure this one was what OP meant, was there not a problem
| 244104 [timx@no pa .] I don't remember seeing anything that explicitly states that you should not use
+ 244062 [B.Candler@po] And also eats as much string as it can without causing the regexp to fail -

JRuby rails-integration release announcement
244040 [robert@cs au] Recently rails-integration 1.0 for JRuby was released.

Issues using array.delete within a loop of the same array
244041 [james.d.mast] This is a simplified example for what I'm trying to do but gets the
+ 244044 [TimHunter@nc] Use  #delete_if instead.
| 244057 [james.d.mast] Thanks - I tried that and it also did not work.  Sorry for not posting
| + 244058 [gavin@re in ] Kindly suggest that you RTFM by typing "ri Array#delete_if" into your
| | + 244064 [robert.dober] This is a nice alias for a.clear ;)
| | + 244076 [james.d.mast] I did RTFM before posting.  The question in my original posting was
| |   244083 [robert.dober] The code I posted was version 1.8.5 p12, and of course I should have
| + 244061 [TimHunter@nc] #delete_if itself iterates over the array elements. You don't need to
+ 244045 [mental@ry ia] a = [] creates a new, empty array; it does not empty the existing array.
| + 244059 [james.d.mast] Yup, good point.
| + 244080 [gwtmp01@ma .] Maybe better to say that the behavior is implementation
+ 244049 [fedor.laboun] ...
| 244066 [robert.dober] Let us see
+ 244063 [gavin@re in ] a = [1,2,3,4,5]

Executing shell commands from Ruby...  again.
244042 [kevin.skrene] I'm not only very new to Ruby, but also to server side programming in
+ 244043 [frdrch@gm il] # -- BEGIN OF EXAMPLE
| + 244048 [kevin.skrene] tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
| | 244053 [stefano.croc] Are you sure that the second END_OF_STRING is right at the beginning of the
| | 244075 [kevin.skrene] Well, I didn't have any indenting going on, but the <<- syntax fixed the
| | 244111 [shortcutter@] The output of system goes to stdout.  If you want to capture it the
| + 244051 [shortcutter@] system <<CMD
+ 244046 [alexey.verkh] ...

yield
244060 [0011@hu h. o] def printer()
+ 244065 [B.Candler@po] It can. Your second function 'printer' takes one argument plus one block.
| 244073 [0011@hu h. o] oh ok, my understanding for some reason was that the method was going to
| + 244077 [perrin@ap th] I'm just guessing here, but . . .
| | + 244078 [0011@hu h. o] its not that i am looking to get any specific result its that i am
| | + 244079 [0011@hu h. o] When i do printer("ball") i am putting the string ball in the arg
| |   + 244084 [gwtmp01@ma .] Forget the block for a moment.  Your question pertains to method
| |   + 244087 [perrin@ap th] Methods are not persistent things -- they are actions taken by objects.
| + 244098 [dblack@wo bl] The two calls to printer are unrelated to each other. Each of them
+ 244068 [matthew.moss] Good.
+ 244102 [lists@be tr ] How did you get this working? Both `printer' calls will
  244109 [dangerwillro] Bertram, some code is not supposed to work.

Beginner learning Object in Ruby
244089 [changtianema] I am new to object-oriented programming and Ruby. Although I learn some
244090 [cmdjackryan@] Two good resources that helped me a lot, are Chris Pine's Learn to
244093 [changtianema] Wow, Thanks for the prompt reply from whoever he/she is.
+ 244113 [huw@DE TH SB] You may also try my Little Book Of Ruby which is a PDF download.
+ 244115 [shortcutter@] I think Why's guide does not work very well in printing because of the
  244290 [changtianema] I have found the link to download the online book :-
  + 244291 [hhausman@gm ] hth,
  | 244292 [gavin@re in ] See also: http://www.google.com/search?q=define:UML
  + 244343 [michael.bevi] ...

OCR in ruby
244094 [ben.wyrosdic] does anyone know of an OCR library in ruby or one that can be called
244105 [timx@no pa .] I don't know of a specific ruby library to do this. However, there is a GNU OCR
244167 [ben.wyrosdic] that worked beautifully ... I use imagemagick to convert the image to

Netbeans Ruby IDE
244106 [brewin@gm il] I've been intrigued by Ruby for a while and recently decided to learn
244131 [perrin@ap th] Have you had a look at FreeRIDE?  I'm not much of an IDE guy myself -- I
244175 [znmeb@ce ma ] I think Curt removed FreeRide from the most recent one-click, although I
244178 [matthieu.rio] ...

Problems with gmailer
244112 [planetthough] I'm a newcomer to Ruby in general and to the Gmailer (version 0.1.5)
244169 [jan.svitok@g] sure ;-)
244180 [planetthough] Okay, looking at protocol.rb, on line 52 appears the following

[ANN] RSS Parser 0.1.7
244116 [kou@co mi ng] * Atom support

Variable confusion for newbies
244118 [rick.denatal] I've noticed a quite a few postings here of late by ruby newbies

IRB as test interface to existing object
244119 [B.Candler@po] I have some object classes to which I want to add an interactive
244139 [vjoel@pa h. ] The following drops into (or _back_ into) an irb session. (Customizing
244143 [B.Candler@po] This works perfectly, thank you (great to get command history!)

attr_accessor
244125 [0011@hu h. o] wow this attr_accessor thing is really great i can see this saving ALOT
+ 244129 [dangerwillro] Indeed!
| + 244133 [dblack@wo bl] I agree with your assessment of David's work but he can't be given
| | 244142 [dangerwillro] Oh, I don't mean to give him credit for that, but for recognizing
| | 244149 [dblack@wo bl] Yes, definitely.  The use of standard Ruby idioms as the basis for
| | 244150 [0011@hu h. o] I have no idea what you guys are talking about but whatever it is i'm
| + 244338 [coder68@ya o] I am getting the same feelings reading this as experiencing Leo
+ 244202 [no.spam@pl a] If you want to check that assigned values are valid at the
  244232 [dblack@wo bl] Wouldn't it be better to call that checked_attr?  I'm just thinking
  244281 [no.spam@pl a] You have the choice of using class checking or block-based checking,
  244284 [dblack@wo bl] It does indeed sound quite versatile.  That, too, puts me in mind of
  244300 [no@sp m. le ] My bad. I was using throw when I thought I was using raise.

attr_accessor question
244126 [0011@hu h. o] how come this doesnt worh though?
+ 244127 [rick.denatal] You don't say HOW it's not working.
+ 244128 [stefano.croc] Animal.new creates an instance of class Animal and calls its initialize
+ 244130 [mguterl@gm i] ...
  + 244132 [0011@hu h. o] ah ok i understand that i am just learning all this OO stuff i just
  | + 244135 [stefano.croc] Whenever you call the new method of a class, it calls the initialize method of
  | | 244137 [0011@hu h. o] So i have to use the age accessor in an initialize method? i dont
  | | 244138 [stefano.croc] puts "Now the size of the animal is #{animal.size)"
  | | 244141 [rick.denatal] Actually the setter should be
  | | 244151 [stefano.croc] Do you mean I should put value into brackets? If so, why? To me, it seems that
  | | + 244158 [rick.denatal] I guess it's a matter of style.
  | | | 244163 [gwtmp01@ma .] You know how the coding style found in "The C Programming Language"
  | | + 244165 [dblack@wo bl] It looks a bit unusual, not having parentheses or at least a space.
  | + 244172 [gavin@re in ] Ruby also has a nice class named Struct for easily creating classes
  + 244134 [0011@hu h. o] now why when i add this new attribute attr_accessor :age i get the error
    244136 [stefano.croc] error.
    244140 [0011@hu h. o] ah ok man just a simple parentheses i hate when that happens,
    244157 [sepp2k@go gl] Some editors offer a feature where opening or closing parantheses, brackets or

inheritance question
244145 [0011@hu h. o] I am trying to figure out how inheritance works using the super method.
+ 244146 [rick.denatal] super(color,age)
| + 244147 [0011@hu h. o] i Know but i initialized all of them in this statement though I
| + 244148 [0011@hu h. o] oh you just use 1 super method for all the args in the super class's
+ 244152 [o.renaud@la ] I have read the questions you posted the last few days, and I would like to
  244159 [0011@hu h. o] Alright thanks for the information. I knew what the error message meant
  244162 [gwtmp01@ma .] Your thought to look at 'ri super' makes sense.  Unfortunately, 'super'
  244181 [0011@hu h. o] oh ok thanks i didnt know that either, i am learning alot of stuff today

Strange Ruby Issue in SciTE - Won't Parse First Input
244153 [me@mi ha lb ] very dead there so here I am.
+ 244154 [michael.bout] bye_response = 0
+ 244155 [ dak@gn .o g] No, you have to press enter once for the while loop to start, and
  244156 [michael.bout] Ah, that makes sense. Thanks a lot for your help David :)

Mixin Classes
244164 [hsolter@gm i] Although I am a seasoned C/C++ programmer(+10 years), I am

mixin classes (continuning from the last post)
244166 [hsolter@gm i] Although I am a seasoned C/C++ programmer(+10 years), I am relatively
244168 [gwtmp01@ma .] Just a guess but I suspect your problem is that you've effectively
+ 244170 [shortcutter@] While this is true, at least @dependencies should be properly
+ 244171 [hsolter@gm i] On the contrary, it's the original version that executes not mine.
  244174 [gwtmp01@ma .] It looks like REXML already provides the two
  244179 [hsolter@gm i] well my sorting criteria something different from that.Consider this;
  244184 [gwtmp01@ma .] Then you are going to have to implement Tsort over a different type

gets() makes my Ruby hang...?
244173 [pythonusr@gm] I'm using Ruby 1.8.5, with SciTE as my IDE.
+ 244176 [its.sec@gm .] I don't think that is what you want, more likely you want something
| 244228 [pythonusr@gm] No. It doesn't take anything in. It just hangs there, until I exit the
| 244304 [griffin.kev@] I had this same problem, run it from the command line and it will be
+ 244177 [cmshea@gm il] There's a well-discussed issue with Windows, Scite, and stdin.  It's
| 244579 [eric.jacobon] $stdin.sync = true
+ 244399 [stefan@ma li] print "What is your name? "

using tcp port via socket on windows 2000 server
244186 [seannakasone] Here's a very simple ruby app that will listen to tcp port 9990.  It
244212 [B.Candler@po] I don't have a Windows 2000 machine, but I think in any case you'll need to

Re: Splitting a String
244195 [renard@nc rr] From a newbie
244213 [B.Candler@po] However that splits into individual words. If you look carefully at the

Golfing the Farey Sequence
244196 [gavin@re in ] A Farey Sequence is all the fractions between 0 and 1 (inclusive) with
+ 244419 [john.carter@] Here's a cheap shot :-P
| 244422 [gavin@re in ] I don't think there are any cheap shots in golf...except those that
| 244428 [john.carter@] Drat! You're right. I didn't notice N went into the front of the sequence.
| 244432 [john.carter@] Low as in the ethical sense, not the byte count.
| 244434 [rakrok@gm il] ...
+ 245441 [ bob@ms .e u] Longer, but builds numerator/denominator arrays based on direct
  245459 [ bob@ms .e u] Here's a minor improvement on size (Still keeping N as parameter).
threads.html
top