183072-389659

182938-197686 subjects 183306-395299

Bruce Tate on ActiveRecord
183072 [snail@ob me ] Bruce Tate on ActiveRecord

Re: REXML, each_element and XPath
183073 [thibaut.barr] "Note that XPaths are automatically filtered for Elements, so that

FXRuby multiple applications
183076 [pseudoman4@y] i use FXRuby and try to start a applicattion twice with the following
+ 183078 [gk@cu co y. ] start the scripts twice, or use a second window.
| 183116 [pseudoman4@y] the problem is that i want to embed to start_fox_app in c++.
| 183217 [vincenzo.pio] The following works, it opens two main windows ...
+ 183169 [lyle.johnson] Well, you can't have more than one application instance in the same
  183301 [pseudoman4@y] I try to make a c++ application with a "open"-button allowing the user

Call Perl script from Ruby
183081 [nick.snels@g] I have a very basic Perl script (calls a nice CPAN library not available
+ 183100 [steve@fi ha ] =20
| 183149 [logancapaldo] ...
| + 183281 [rob@mo io pa] ruby script.pl
| | 183416 [logancapaldo] ...
| + 183282 [rob@mo io pa] Look at them gem called "session". It's nice for executing processes.
+ 183106 [bob.news@gm ] sql = `perl vendor\\sql\\sql.pl "#{@question.sql}"`
| 183273 [nick.snels@g] It worked beautifully, thanks Robert. I'm also going to take a look at
+ 389658 [hiepnguyen36] I am newbe, and I get in trouble with special character '->'
+ 389659 [hiepnguyen36] I use

Ajax request & updating multiple divs
183084 [lists@na bl ] I'm a relative newbie to RoR and had a question about using form_remote_tag.

Newbie: sorting an array of custom objects
183090 [ebuffer@de e] As a project for learning Ruby, I'm writing a simple game. I have some
+ 183092 [lopexx@au og] arr.sort_by{|obj| obj.some_field}
| + 183094 [lopexx@au og] there is also another method for array sorting (actually it was the
| + 183095 [ebuffer@de e] That solution requires some_field to be 'naturally' ordered, though,
|   + 183109 [brian.matter] Ideally you would have a Card class that has value and suit fields. Then you
|   + 183126 [dharple@ge e] As mentioned, you should use the Comparable mix-in.
|   | + 183135 [dharple@ge e] However, the SUITES and VALUES constants should be in the Deck class.
|   | + 183276 [delete.ebuff] Thanks a lot! This sort of resembles the code I've written, apart from
|   |   183278 [delete.ebuff] Also, let me add that I've heard lots of nice things about the Ruby
|   + 183255 [g_ogata@op u] arr.sort_by{|card| ~card.suit[0] & 0x1a}
+ 183097 [dharple@ge e] You could use a SortedSet, however this has a downside. A Set
+ 183099 [fxn@ha hr f.] class Foo

unsubscribe
183093 [brockweaver@] ...

type at rubycentral?
183101 [uval@rz un -] Returns the number of arguments required by the block. If the block
+ 183104 [uval@rz un -] and one case is missing there
| 183159 [logancapaldo] Negative arities indicate the _minimum_ number of args to a proc that
+ 183139 [uval@rz un -] I forgot to copy&paste the link
  183147 [james_b@ne r] I believe that page refers to Ruby 1.6.

Net::IMAP - Support for 'plain' authentication?
183108 [seanhussey@g] Our IMAP server here is configured to support only the PLAIN
+ 183115 [steve@fi ha ] Take a look at <raa.ruby-lang.org/cache/imap-backend/imap-backend.rb>
| 183122 [seanhussey@g] Interesting...I'll give it a try.  Not much documentation, though.
+ 183138 [f@an re s- .] Try IMAP#login instead of IMAP#authenticate, this uses a different
  183180 [seanhussey@g] Oh, wow, it works.  That's amazing.
  183501 [rasputnik@gm] stick with net::imap. less to install and it's a really lovely

Looking for good reads on Ruby TK GUI programming
183125 [htruax@st .c] ...
+ 183253 [nagai@ai ky ] Do you mean about such like as TkWindow#grab or TkWindow#focus?
| 183307 [htruax@st .c] I didn't check the source tree you mentioned, but I will, thanks.
| 183342 [nagai@ai ky ] First of all, you'll have to clarify the design concept of your GUI.
| 183357 [htruax@st .c] Thanks so much for the code. I think that is what I am looking for - I need
| 183477 [nagai@ai ky ] Is the 'screen' a physical (multi-display) screen? Or a logical one?
+ 183313 [gk@cu co y. ] ...
+ 183319 [chris.hulan@] I haven't had a chance to check myself, but I understand the some of
+ 183328 [doodpants@ma] No. And it's frustrating. The only Ruby/Tk tutorials I've been able to
  + 183330 [htruax@st .c] Karl,
  + 183352 [nagai@ai ky ] based on Ruby 1.8.2-prevew).

Newbie: undefined method
183127 [tim.hennekey] I get "undefined method `name' for #<TSPProcess:0x38c7fc0>" when I
+ 183128 [tim.hennekey] <% @processes.each do |process| %>
+ 183132 [dharple@ge e] The @name could be causing some problems. If you really want a
  183136 [tim.hennekey] This worked out for me, thank you.

ANN: uformats 1.2 (Microformats parser for Ruby)
183134 [pbattley@gm ] The parser that we are using at www.reevoo.com for aggregation of
183295 [chneukirchen] Fantastic!

Searching for a very fast string parser
183141 [mksm.sama@gm] I want to parse a log file containing several line in the same format.
183144 [ara.t.howard] can you put a demo log file on the web somewhere?
183146 [mksm.sama@gm] I'm sorry, the log file i have comes from a live firewall. I'd rather
183178 [james@gr yp ] Would randomizing the data render it safe?
183192 [vikkous@gm i] OK, so first off, your sample implementation seemed to have several
183310 [bob.news@gm ] ...
183314 [bob.news@gm ] ...

Form issue
183145 [chad.d.johns] I have a dilema. I have an HTML form which is in a test format, and the

Ruby's WWW::Mechanize
183151 [aaron_patter] package, but unfortunately I've found a few bugs in it.  I've made

[ANN] Tar2RubyScript 0.4.7
183152 [pan@er kv en] I just released Tar2RubyScript 0.4.7.

Windows Console I/O in Ruby
183153 [matt.hulse@g] Is there a Ruby equivalent to the WConio Python Module or similar conio
+ 183186 [adam.shelly@] seems like Ncurses does most of the same things as wconio.
+ 183232 [vanek@ac .n ] this may be of use,

[ANN]  RubyScript2Exe 0.4.2
183155 [pan@er kv en] I just released RubyScript2Exe 0.4.2.

[ANN] AllInOneRuby 0.2.9
183156 [pan@er kv en] I just released AllInOneRuby 0.2.9.

rbtree tests fail on 1.8.2, but not on 1.8.4
183166 [toby@cb g. e] I dug up the rbtree 0.1.3 tarball from the RAA cache and am trying to
183170 [ara.t.howard] i can confirm the above at least... may have time later to look into it.

validatoin image filed
183175 [michaelaugus] I have problem to check the validation of the image field
183179 [f@an re s- .] Please ask this on the Rails mailing list.

Ruby c++ extension on intel mac
183183 [reevesg@po o] Hey,
183188 [steve@fi ha ] =20
183191 [ara.t.howard] try

Newbie: Rails Controller Attribute Scope
183185 [tim.hennekey] I'm having a hard time figguring out what is wrong with my controller.
+ 183193 [tanner.burso] ...
+ 183194 [lopexx@au og] In Rails unlike in Struts a new (statefull) instance of your Controller

Rails: in_place_editor_field and editing blank fields
183190 [deja@ho er e] I just started playing with in_place_editor_field and its pretty neat.
183214 [joevandyk@gm] 1.  This is a Rails question and should be asked on the Rails mailing list.

Bizarre sudden problem with WIN32OLE - could not find specified procedure
183195 [temp@lo ri a] I've been using win32ole alot for talking to Excel.
183196 [temp@lo ri a] ok, I;ve found the solution!

Best way to start new ruby script?
183197 [m-lists@br s] I have a long running process that I want to start from a Rails request.
183221 [shortcutter@] - do it in a thread
+ 183228 [vjoel@pa h. ] Portably, the following works, as long as you don't mind not having
+ 183229 [m-lists@br s] Do it in a thread seems like the simplest solution but I don't know if
  183239 [ezmobius@gm ] Keep in mind that rails and fork don't get along very well. If you
  183261 [ara.t.howard] # all open file handles duped
  183274 [m-lists@br s] I ended up doing a simple drb service external to the Rails application.

idioms for separating out OS-specific stuff
183199 [joevandyk@gm] - get the current user's login name
+ 183204 [logancapaldo] ...
+ 183208 [gwtmp01@ma .] class A
+ 183224 [mental@ry ia] Maybe it would be better to break up the modules by feature rather

globals outside of OO scripting
183200 [rtilley@vt e] When writing methods as functions (I know they're methods pretending to
+ 183202 [elven@sw rd ] No, you still need to use either global or instance variable syntax, since
| 183209 [rtilley@vt e] OK, but the script works wheter I use $ for globals and @ for instance
| + 183218 [gwtmp01@ma .] Whether you use globals or top-level instance variables for a small
| | 183238 [rtilley@vt e] class Thing
| | + 183240 [logancapaldo] You can't, that's kind of the point. You can write accessors (or
| | + 183241 [drosihn@gm i] ...
| |   183245 [rtilley@vt e] Thanks for the examples and info guys!
| |   183249 [logancapaldo] Depends. Why are you accessing it outside the class? If its to change
| |   183280 [rtilley@vt e] It's a filepath (c:\name_of_file) I only wanted to define the path once
| |   183417 [logancapaldo] class NeedsAPath
| + 183230 [lukfugl@gm i] I'm curious what your script is then. Because the variable will not be
|   183231 [lukfugl@gm i] D'oh, I should have actually tested that *before* posting. This
+ 183205 [logancapaldo] No
+ 183207 [ara.t.howard] but why?  at the very least do

assert_raise question
183201 [seanacarley@] ...
+ 183206 [jim@we ri hh] +1
+ 183225 [drbrain@se m] For a given input a method should only raise one class of exception.
| 183242 [jim@we ri hh] The reason I would like it is that the test is the specification of the
| + 183269 [eastcoastcod] +1 again.
| | 225996 [efine145-nos] Agreed.
| | 363693 [r@al m. it e] +1 also.
| + 363727 [robert.dober] There is no way you are wrong, thus you are both right :P.
+ 312868 [41mortimer@g] This is a somewhat unrelated question, but in playing around with this,
  + 312871 [B.Candler@po] irb(main):013:0> puts ArgumentError
  | 312874 [41mortimer@g] Well, now that you explained it, it makes perfect sense!  Thanks.
  + 363795 [b.candler@po] foo { ... }  is parsed as a method call with a block.

Modular Ruby
183203 [elven@sw rd ] Im looking for a framework or some other means of un-/loading ruby code into
+ 183212 [julian.kamil] Bernhard, I am working on such a "sandbox" for the Pandora project.
+ 183219 [shortcutter@] I think this is not possible using plain ruby because you can always
  183227 [elven@sw rd ] Thought so.  Well, I guess I'll fiddle around with a TCL-like-approach
  183279 [botp@de mo t] #It's not done, yet, but when it does, it will allow "client side" Ruby
  183305 [julian.kamil] My plan is the following...

[OT] Re: idioms for separating out OS-specific stuff
183210 [vjoel@pa h. ] I've been wondering how to do that, either on 2.4 or 2.6. What are you
183213 [joevandyk@gm] I don't have the code in front of me, but there's a file in /proc

My Ruby talk @ work..
183226 [steve@wa ts ] I just finished my "Learn Ruby" talk for the programmers here at work.
+ 183233 [ara.t.howard] very nice.  i'm stealing your template.  ;-)
| 183235 [steve@wa ts ] Excellent!  Maybe we could bundle it into a "Ruby Tutorial Kit"?
+ 183234 [cohen.jeff@g] Looks great, Steve.  Thanks for publicizing it.
| 183236 [steve@wa ts ] Thanks.
| 183243 [cohen.jeff@g] And it's much better than the "it's an immutable string" explanation,
| 183247 [logancapaldo] Enums are typed in C++, to a certain extent (better than C anyway),
+ 183257 [r.mark.volkm] I like the way you mixed in a little mixin humor.
| 183265 [steve@wa ts ] Thanks..  I do like the Mixin.  :)
+ 183258 [dave@bu t. d] Your section on control structures is a little broken. You have "loop do ...
| 183268 [steve@wa ts ] Oh yikes!  It's just a poor example and it's what I get for working
| 183270 [dave@bu t. d] While we're on errata, the @instance_var in the section on Variables may be
| 183272 [steve@wa ts ] Cool.. thanks for all the feedback Dave!!!  I'll look at
+ 183327 [jesusrubsyou] I only read the first 20% or so (for lack of time at the moment), but I

Problem Solving Skills for Engineers
183237 [bparanj@gm i] I have been a software developer for the past 10 years now. I get job
183302 [chneukirchen] Did you find a solution against the spam problem?
183418 [bparanj@gm i] It has a subject line and if you don't like it you don't have to read
+ 183422 [dharple@ge e] Are you seeking how to develop problem solving skills? ;)
+ 183428 [ruby@cr zy e] You didn't "send it to the general group" - you sent it to the Ruby-talk
+ 183470 [tdenkinger@g] ...

catch throw ?
183244 [BPaatsch@ac ] ...
+ 183248 [logancapaldo] They have to be in the same call chain.
+ 183259 [ara.t.howard] p catch('answer'){ load 'b.rb' }

Displaying Marshalled Object from HTTPServlet::FileHandler
183250 [aaronbecker1] When I browse the marshalled files in the directory browser, I would

text editor
183251 [dan@fr ee e.] hey all, does anyone know where I can find a good text editor for code?
+ 183252 [tyellow@yi .] Posted via http://www.ruby-forum.com/.
| + 183264 [mark_rogers@] If you are on Mac OSX, try subethaedit.
| | 183344 [rhkramer@gm ] If you're on Linux, but coming from Windows, consider nedit.
| | 183407 [glenn.ruby@g] ...
| | 183438 [danielbaird@] ...
| + 183442 [garcia.serva] Emacs is a hard beat . Download a few extension modules and your off,
|   183577 [igor.sarzisa] I use Window Xp and i have tried JEdit, SciTe, Cream/Vim, UltraEdit,
+ 183262 [horndude77@g] www.vim.org
+ 183275 [gk@cu co y. ] try vim (hard to learn)
+ 183284 [rob@mo io pa] It's not an editor it's an IDE but I find eclipse with the RDT (ruby
+ 183285 [rwoliver2@gm] Dan,
+ 183286 [google@er kv] NOTEPAD.EXE
| 183332 [doodpants@ma] Notepad isn't a good text editor for *anything*. While it's true that
| 183337 [ruby@cr zy e] That's why I've replaced all my links to notepad.exe with notepad2.exe
+ 183296 [heimdall@un ] There are millions of threads about this topic, but ok, here's a short,
| 183303 [thinkdiv@go ] Not to forget:  - ActiveState Komodo
+ 183323 [jesusrubsyou] Pistos.horn.toot do ||
+ 183335 [reevesg@po o] I like TextMate on OSX.
+ 183756 [jussij@ze se] It has programming specific features like code folding,

Re: Displaying Marshalled Object from HTTPServlet::FileHandl
183254 [aaronbecker1] Looks like I just need to inherit from HTTPServlet::FileHandle and

Ruby and XSLT
183260 [derek.mahar@] What Ruby libraries are available to parse and process XSLT?  How does
183263 [zengke@ce la] Ruby/XSLT is a simple XSLT class based on libxml <http://xmlsoft.org/>
184248 [tobycatlin@h] I am trying to use ruby-xslt under windows.
184261 [tobycatlin@h] After more searching on forums and other pages it seems that ruby-xslt
+ 184265 [r.mark.volkm] You might be better off to use Apache Xalan or Saxon. Both are
+ 184269 [smerk@fi mu ] If your tranformations are really simple,
| 184277 [tobycatlin@h] thanks, guys. I'll take a look at Xalan and see what i can do.
+ 184278 [rossrt@ro co] Not that this is much help right now, but I recently did some work
  302468 [bruno.lehyar] I experiment Saxon9, invoked by the command line.

Convert String to Hash
183288 [nick.snels@g] I get a string inputted in my program, which I convert to a hash-like
+ 183289 [elven@sw rd ] no, you can't pass it to Hash.new directly, you'd have to write a parser for
| 183291 [rob@mo io pa] *throws banana ad Bernhard*
| 183294 [elven@sw rd ] Well, in certain local-only low-security scenarios it might be of use. I
| 183299 [nick.snels@g] thanks for all the replies. I used the eval method and it worked!! The
+ 183290 [rob@mo io pa] Use YAML.
+ 183292 [lopexx@au og] sql = '"table_alias" => [],"original_string" => "select * from table"'
  183293 [rob@mo io pa] Argh!

[Newbie] Immutable objects
183298 [ebuffer@de e] Still working on the basics... for my card game, I want the Card objects
+ 183311 [bob.news@gm ] It's not sufficient, you'll have to freeze those strings, too.  Note that
| 183322 [delete.ebuff] Ah, I see - in C# "where I come from", strings are immutable. Of course,
| 183374 [g_ogata@op u] For things like @suit -- which I take it can only take one of four
| 183480 [delete.ebuff] Thanks - this is starting to feel like playing an adventure game where
| 183482 [bob.news@gm ] Alternatively you could use constants
| 183489 [ebuffer@de e] Ah, yes, I guess it's like physical exercise - "no pain, no gain"
| 183492 [bob.news@gm ] Actually I believe this is how learning works: basically it's trial and
+ 183315 [james@gr yp ] As a Ruby rule of thumb, you make an immutable object just by
  183325 [delete.ebuff] Thanks - that answers my real question, 'how do you make an object
threads.html
top