196087-197990

195870-302700 subjects 196325-199437

ruby setup?
196087 [schapht@gm i] A lot of ruby packages have this setup.rb file that always generates

leaving files open
196097 [hawkman.gelo] ...
+ 196100 [decoux@mo lo] You can lost data
+ 196102 [shortcutter@] With buffering IO your changes might not be written to the file (this
+ 196103 [schapht@gm i] No expert here, and I'm sure it depends on the OS.  But I think the
| 196109 [james@gr yp ] All files should be closed on exit, assuming exit!() wasn't called.
| 196111 [syarus@gm il] FWIW, kill -KILL and program crashes loses written but unsynced data.
+ 196106 [logancapaldo] The major issue with not closing files on *Nix is that you *could*

Using Ruby to read .properties file
196101 [Sanchit.Misr] I am working on a project in which I need to read and write the
+ 196105 [Stephen.Lock] None that I know of without writing code - but there isn't much to it.
| 196118 [Sanchit.Misr] Thanks a lot for the code
+ 196108 [logancapaldo] What is a .properties file? After some googling it looks like it's a
| 196116 [Sanchit.Misr] Thanks for the help and hints :)
+ 196115 [edder@tk sp ] Have a look at yaml, It allows you to easily save objects in files and

fxri and tab completion
196120 [r.mark.volkm] I want to report to whoever maintains fxri (Markus Prinz?) that tab

Range methods include? and member?
196122 [r.mark.volkm] Do the Range methods include? and member? now do the same thing?
196123 [james@gr yp ] Yes, they do.  I ran into this issue a while back and had to come

Project Directory Layouts
196125 [transfire@gm] I'm wondering about good practices with regard to the layout of
196132 [jim@we ri hh] The subversion tags/brachnes/trunk stuff is for subversion only.  Your
196151 [transfire@gm] Nice. Thanks Jim. That was a big help.

Multiple threads on single port
196126 [stuart@se ve] Can I use Ruby threads to have more then 1 server process running on the
+ 196136 [jim@we ri hh] [... example elided ...]
+ 196141 [hramrach@ce ] This will probably create multiple threads that accept connections. I only did
+ 196145 [khaines@en g] Don't do this.
+ 196146 [garbagecat10] ...
  196169 [stuart@se ve] Ok, the final code for this example I have done is

Ruby Quiz Wins Contest
196130 [james@gr yp ] This week's quiz has enough entries to qualify for a signed book.
196135 [schapht@gm i] *claps*

Mailing List Archives Down
196131 [james@gr yp ] Are people aware that the mailing list archives are down?
196143 [lukfugl@gm i] I did notice this yesterday (as far as the ones on ruby-lang.org). The
196156 [james@gr yp ] Ah, yes.  I am referring to ruby-talk.org.  Good to point out.

One-click installer for Windows and win32-open3
196134 [Nuralanur@ao] ...
196152 [djberg96@gm ] The win32-open3 package is not part of the one-click installer.  If you

Mailing list
196139 [gunnar.sjoo@] ...
196157 [lists@ha ff ] youneedtounsubscribeyourselfjustlikeyousubscribedyourself

Animation
196144 [fake@gm il c] Okay I wana make a game like Flyff in ruby but, is there a way to
+ 196194 [asdas@as as ] Is there a tutorial about it?
| 196196 [lyle.johnson] Gotta love ruby-forum.
+ 196208 [leslieviljoe] If it was me, I'd do it in Ruby and write C extensions for the places

Ruby App as a Windows Service?
196147 [jim@fr ez .o] ...
196153 [djberg96@gm ] You could use those, or use win32-service. :)
196154 [steve.debaun] I couldn't get win32-service to work.  I ended up using Firedaemon.
196159 [jim@fr ez .o] ...
196179 [jcribbs@ne p] I want to second Daniel's suggestion to use win32-service.  If no one

enterprise-grade SOA framework (was Re: I love Ruby - But how bright is Ruby's Future?)
196155 [brianm@ap ch] Apologies for the rant, but...

Instance methods can't call protected class methods?
196163 [sean.hermany] I am trying to understand this behavior.
+ 196175 [pertl@gm .o ] where's the problem?
| + 196177 [sean.hermany] The problem is that self.call_me is not protected.
| + 196180 [jim@we ri hh] Unfortunately, this method is neither "static" nor "protected".
+ 196178 [jim@we ri hh] [... example elided ...]

RubyConf Lightning Talks (Was: Deadline for RubyConf 2006 Presentation Proposals)
196170 [drbrain@se m] I would really, really, really like to see a lightning talk session
+ 196174 [james_b@ne r] Agreed.  That would be quite interesting.
| 196176 [pat.eyler@gm] Yes, please!   I proposed these for OSCon a couple of years
| 196185 [jeff.barczew] ...
+ 197990 [rubyzbibd@ub] I agree.  The lighting talks at the Ruby conference in Japan were fun.

Slicing arrays
196173 [paul.kraus@g] ...
+ 196192 [robert.dober] ...
+ 196198 [TimHunter@nc] Have you tried the values_at method?
  196204 [robert.dober] ...

[ANN] FreeRIDE 0.9.6 - The Free Ruby IDE
196181 [laurent@mo d] Version 0.9.6 of FreeRIDE has been released and is available for download!
+ 196183 [lyle.johnson] ...
+ 196186 [phil@ha el .] Can I ask how this is going to be implemented? I think there are some

Attributes not populated until called?
196182 [bulliver@ba ] charset="us-ascii"
+ 196188 [robert.dober] ...
| 196189 [robert.dober] ...
| 196195 [bulliver@ba ] charset="iso-8859-1"
| 196203 [robert.dober] ...
| 196205 [bulliver@ba ] charset="iso-8859-1"
+ 196190 [james_b@ne r] Add code to to_a to populate the instance variables if they are not et
| 196201 [bulliver@ba ] charset="iso-8859-1"
| 196256 [daniels@pr n] That line calls the initialize() method from your superclass and assigns
| + 196333 [chris.hulan@] add a call to super in your subclass initialize to get the defaults from
| + 196351 [bulliver@ba ] charset="iso-8859-1"
+ 196197 [ara.t.howard] ATTRIBUTES = %w( title artist album genre year comment )
  196202 [bulliver@ba ] charset="iso-8859-1"

Ruby and Gnuplot under Windows (was: Re: External application under Windows)
196207 [Nuralanur@ao] ...
196210 [djberg96@gm ] Note to author of Gnuplot.open: use File.which, from the ptools
196215 [ara.t.howard] but doesn't seem to be in my ruby?  where are you getting it?
196218 [djberg96@gm ] gem install ptools :)
196221 [ara.t.howard] very cool.  thanks!

Strange behaviour of Rb-Gsl random numbers (Windows one-click installer)
196211 [Nuralanur@ao] ...
+ 196213 [ara.t.howard] you have to specify what kind of random number generator you want.  try this
+ 196220 [ara.t.howard] [0.186914603225887, 0.951039797859266, 0.545435771113262, 0.0746261349413544,

can I keep re-running the same script?  how?
196212 [walkerhunter] I want to run a particular script every 3 minutes.  I would do this
196214 [ara.t.howard] sleep 180
+ 196216 [steve.debaun] Uh...
+ 196217 [djberg96@gm ] In practice I would say this is a bad idea.  What if you start this on a
| 196219 [ara.t.howard] dan is right of course.  i didn't say it was a good idea - but you can do it
| 196222 [walkerhunter] I agree 100%.  I just want to get something up and running while I
| 196223 [halostatue@g] * * * * * /path/to/bash script-to-setup-environment-and-run-my-program.sh
| 196224 [walkerhunter] So I should create a shell script that runs the command?  Can you
| + 196242 [halostatue@g] The first trick is that you need to build the necessary $PATH and
| + 196249 [ara.t.howard] #! /usr/bin/env ruby
+ 196251 [jp@je fp it ] Not to be contrarian, but pickaxe page 180 says that ARGV[0] is not the
  + 196257 [walkerhunter] exec ["ruby" + ARGV].join(' ')
  | 196261 [caldridge@gm] I would either fix cron or use
  | 196262 [caldridge@gm] *without a scheduling system
  + 196260 [ara.t.howard] sure.  a mistake ;-)
  + 196268 [nobu@ru y- a] You don't need join here.
    196401 [walkerhunter] I got the cron working by doing two things.  Using Tar2RubyScript and

DLL load path
196225 [vshepelev@im] The strange question: I need modify path, where .dll's would be looked for
+ 196227 [logancapaldo] $LOAD_PATH << <my custom folder>
| 196231 [vshepelev@im] Hmmm... I think it would only affect Ruby modules, not Windows dll's
+ 196228 [dave@bu t. d] ENV['PATH'] += ";C:\\my\\custom\\folder"
  196232 [vshepelev@im] Burt

email reading & more
196236 [pat.eyler@gm] There are two pieces of emacs (yes, they're available elsewhere

Two questions about data structures.
196237 [timuckun@gm ] I am building an application and would like the groups advice on the
196290 [daniel.schie] Do you want a class to represent such an entity?
+ 196292 [daniel.schie] I'm such a nice guy...
| 196420 [timuckun@gm ] I understand what you are doing I think. It's a neat solution. But how
| 196423 [daniel.schie] @opts contains the keys and the boolean values (if you go for the
+ 196293 [timuckun@gm ] I was thinking more about how to save all those options in the

Too much email (Was: ruby-forum.com)
196238 [drbrain@se m] I'm planning on using per-mailbox Bayesian analysis for phase three.
+ 196252 [ruby-talk@wh] My crontab and I attest.  I love how the whole suite works together.  You set up
+ 196372 [gilesb@gm il] Bayesian filtering on a topic by topic basis!! Awesome!!!
| 196384 [drbrain@se m] I use the plain old flag button in the mail client to keep things
+ 196378 [steve@wa ts ] Nice work.. I did something to deal with my own Maildir overflowage,

regex for splitting filenames
196239 [bulliver@ba ] charset="us-ascii"
+ 196241 [cdc@cy he s.] than=20
+ 196245 [halostatue@g] ext = File.extname(filename)
| + 196247 [M.B.Smillie@] Equivalent, but I like the semantics a little better
| | 196302 [halostatue@g] I think you mean f.basename(f.extname) for the basename without the extensions.
| + 196248 [bulliver@ba ] charset="iso-8859-1"
+ 196246 [ara.t.howard] ["bar", "txt"]
+ 196250 [daniels@pr n] Not sure if it can be considered elegant, or if it'll work in all
+ 196323 [rubyprogramm] If you want to use regex, try this;

What's going on here? (Newbie question)
196240 [matt.g.brown] f = File.new('numbers.txt')
196243 [mike@st k. a] because as each iterates through the file it "consumes" the file
+ 196244 [matt.g.brown] ...
+ 196275 [logancapaldo] I wonder if IO#each should be changed to automatically #rewind at the
  + 196282 [dave@bu t. d] Too magical. Streams are often one-way. If you need to read the same
  + 196308 [bryan.weathe] f = IO.readlines(file)

Automating Access
196253 [warrend@kj o] charset="windows-1250"

link_to with pagination
196254 [landry.c@ro ] I need some help with pagination and the link_to in the view.
196255 [landry.c@ro ] <%= link_to('next', {:params => params.merge('answer' => @answer,
196274 [logancapaldo] Wrong mailing list

Installation of Win32-service module
196258 [jatinder.sau] ...
196271 [phasis68@ho ] Above is normal message for Visual C++ 6.0.
196303 [jatinder.sau] ...
196304 [jatinder.sau] ...
196310 [phasis68@ho ] You can download compiled binary file "service.so" at
196327 [jatinder.sau] ...

Test Email <EOM>
196259 [jatinder.sau] ...

pausing until a character is received
196264 [sy1234@gm il] I'm struggling to figure out how to pause my script and await a single
+ 196270 [dave@bu t. d] begin
+ 196276 [logancapaldo] What ^C is actually depends on your terminal. If ^C is SIGINT for the
| 196280 [dave@bu t. d] Not true - if you handle the SIGINT, there's no reason why you
| + 196316 [sy1234@gm il] Thanks for the help everyone.  It sounds like trap(:INT) {} will lead
| + 196337 [logancapaldo] Aha. Well I think our respective operating systems have a difference
|   196385 [dave@bu t. d] Interesting. I'm sorry for my blunt denial; I actually even expected
|   196397 [sy1234@gm il] No, but I'll play around some more.
|   + 196398 [hal9000@hy e] trap(:INT, &begin
|   + 196399 [hal9000@hy e] trap(:INT, &begin
|   + 196400 [sy1234@gm il] Well.. since I can process the characters I receive through read_char
|     196404 [sy1234@gm il] Just for kicks I tried to better understand what's going on with trap.
|     196410 [dave@bu t. d] Signals are used to asynchronously interrupt programs. For example when
|     196469 [sy1234@gm il] This keeps things simple.  Nice.
+ 196307 [james@gr yp ] require "highline"

Re: web development w/ ruby minus rails
196269 [rahul_kumar@] I too am unable to find any documentation or help for building wep apps
+ 196277 [james_b@ne r] Consider IOWA or Narf or Og/Nitro.  Or their libraries.
+ 196312 [schapht@gm i] I've come up against the lack of tutorials for such a thing as well.
  + 196315 [asenchi@gm i] I've used Rails so much, that now I just install Rails, and use it
  | 196318 [schapht@gm i] I've considered this option as well and I kinda like it.  My main
  | 196913 [Eric.Armstro] That sounds like a terrific project, well worth pursuing.
  | 196914 [alex@bl ck e] Even if you do find you need a database eventually, you should take a
  + 197478 [anne@wj .h r] How do you make progress if there is no documentation? What is the key
    197486 [garbagecat10] ...
    + 197528 [anne@wj .h r] It was very hard to install eruby, I had to install erb, and then I did
    | 197532 [garbagecat10] ...
    + 197557 [listbox@ju i] I am actually eager to see something emerge that will be the next

Tempfile.new("foo") --> /tmp/foo123.0 *NOT* /tmp/foo.123.0 like docs says...
196272 [ruby@ph li .] Creates a temporary file of mode 0600 in the temporary directory whose
196289 [matz@ru y- a] Hmm, it's a documentation error.  Thank you for the report.

Console input
196278 [michal.blaho] data = gets
196284 [dave@bu t. d] "chomp" does not alter the string, it returns a new, modified copy.
196288 [botp@de mo t] # data.chomp

open-uri error
196287 [curi@cu i. s] I am writing a script to download warcraft 3 replays for me. It got a
196341 [curi@cu i. s] url = URI.escape(url)
196408 [curi@cu i. s] oops. that didn't work for URLS with [] in them. now i've added this

Ruby and Gnuplot and Windows
196294 [Nuralanur@ao] ...
196297 [Nuralanur@ao] ...

Re: [SOLUTION] Hash to OpenStruct (#81)
196300 [transfire@gm] I'm pretty sure that implict conversion only occurs for values not
196301 [Ola.Bini@ki ] irb(main):002:0> YAML.load("a: b\nyes: false\n")

Trouble with create_function and sqlite3-ruby-1.1.0
196305 [helge.elvik@] I'm currently trying to implement an app that makes use of the

Getting rid of a while loop
196306 [taitbp@ya oo] I get a feeling there should be another way to make this happen without
+ 196309 [james@gr yp ] require "enumerator"
| 196313 [shortcutter@] Thanks for leaving the inject version for me. :-)
| 196324 [simon.kroege] hehe, nice, with 1.8.4
| 196329 [pertl@gm .o ] this is _really_ strange!
| 196331 [chris.hulan@] you forgot to
| 196356 [pertl@gm .o ] aaahhhh :-))
+ 196314 [farrel.lifso] while (questiom,answer = file.gets,file.gets) ?

Re: Hash to OpenStruct (#81)
196311 [transfire@gm] Hmm... I'll have to investigate that. Is it according to the spec?
196340 [Ola.Bini@ki ] Yes, I actually believe so, since it says explicitly in the spec that

while terminating process
196321 [stuart@se ve] I have writing a program that servers http, very simple, however, if

Possible YAML bug with quoted symbols?
196322 [dave.baldwin] If I have a quoted symbol, i.e. :'some symbol' then when I dump the
+ 196330 [Nuralanur@ao] ...
| 196332 [dave.baldwin] Axel,
+ 196335 [ara.t.howard] Symbol
  + 196338 [rossrt@ro co] That's wierd. I've seen this problem before (I switched to Marshal in
  + 196339 [logancapaldo] % irb
    + 196343 [Nuralanur@ao] ...
    + 196348 [ara.t.howard] irb(main):001:0> sym = :"a symbol"
      196355 [logancapaldo] Compiled from source on OS X. Yay! A platform-specific problem. My
      + 196357 [ara.t.howard] ah.  bummer.  this is what's kept me from moving to mac - seen too many of
      + 196366 [dblack@wo bl] I think it's a platform-specific solution -- that is, it only works on
        196369 [ara.t.howard] ruby 1.8.4 (2006-01-12) [i686-linux]
        196373 [dblack@wo bl] $ ruby -r yaml -ve 'p YAML.load(YAML.dump( :"foo bar" ))'
        + 196374 [ara.t.howard] ah.  i guess you guys don't run latest stable?  that 1.8.4 is getting old!
        + 196376 [ruby-talk@wh] At the risk of accusing Ara of being ahead of the curve, a patch was committed
          196377 [ygwegey@ee .] If your question is only whether ruby is better than python - yes, it
threads.html
top