305784-310150 subjects 306204-349836

Spacing data into columns
305971 [tekmc@ho ma ] properly spaced out so it's more readable.
+ 305972 [ara.t.howard] # compute widths expensively
| 306052 [shortcutter@] Here's another approach - a bit more lightweight but you need
+ 306050 [fox@ns l. su] If you're going to do a lot of this sort of thing.

Reorder a XML file by distance from a location
305973 [ibnooo@gm il] I'm quite the newbie and I'm looking for some help. I need to do
306002 [vjoel@pa h. ] There's nothing to sort on until you compute distance. Start by googling
306021 [ibnooo@gm il] thanks, but my problem is not with the distance, but merely sorting
306065 [ruby@th ma z] class Location
306089 [ibnooo@gm il] Very helpful, thank-you-very-much !
306119 [ibnooo@gm il] So I can compare and sort two items..
306123 [ruby@th ma z] The solution works for any number of items. sort() uses <=> during the

mock web services through ruby
305976 [aidy.lewis@g] Has anyone managed to mock web services through Ruby. And if so, could
305977 [kitplummer@g] Are you looking for a specific kind of web service?  Or, just HTTP
305985 [aidy.lewis@g] On Jun 23, 10:20=A0am, "kitplum...@gmail.com" <kitplum...@gmail.com>

RDoc formatting
305978 [mcnulla@gm i] I found a few formatting bits in the RDoc RDoc. But I am looking how
316180 [tony.strauss] Clicking on any RDoc link in the document will take you to a list of

[OT] Re: Zed and Luis drop the bomb on Ruby's poor performance
305990 [ara.t.howard] afaik they have more 'four letter' words than any language in the
306038 [robert.dober] you mean more than in Italian, ridicolous, believe me I lived in both

date intervals for graphs
305994 [nostef@gm il] I'm in a position where I have to create dynamic date based Line graphs.
+ 306008 [Rob@Ag le on] gruff or GoogleCharts, perhaps?
+ 306067 [ruby@th ma z] Why is 100 points too much? If your graph will be 200 pixels wide or

Remote MySQL server and Ruby on Rails
305995 [wedix@ma .c ] I have 1 DB server (MySQL) and 1 server with my application. I've
+ 306154 [kranthicu@gm] ...
+ 306247 [rogerpack200] You may need to specify a port number, and/or protocol: tcp.  GL!

Rails threaded file upload via cURL.
305996 [gberz3@gm il] I am currently working on a project that needs to upload multiple

Suggestion: Enumerable#all?/any? with argument
306001 [farrel.lifso] I was thinking about Enumerable (one of Ruby's more powerful modules)
+ 306003 [farrel.lifso] I should also add that the argument would be optional with any? and
+ 306004 [vjoel@pa h. ] Makes sense, because
+ 306005 [mikael@ho lu] I love it.
+ 306028 [shortcutter@] +1
+ 306031 [devi.webmast] +1

Upgrading Ruby
306014 [caliwildman2] I currently have Ruby 1.8.5 and Rails 1.2.3. I want to upgrade Ruby to
306131 [jan.svitok@g] I'm that someone ;-)
306145 [caliwildman2] Unfortunately due to the fact that htree uses site_ruby instead of gems,

Running system() without output
306015 [kirbykirbyki] Heya,
306018 [ara.t.howard] `#{ command }`
306019 [kirbykirbyki] That works! Thanks.

306026 [chriscederst] ...

Faking named parameters and enforcing required params
306027 [lists@gr gw ] I come from years of using a language with named params. I prefer the
+ 306041 [robert.dober] Maybe something like
| 306042 [robert.dober] BTW I guess Facets has things like these already!
+ 307372 [rogerpack200] Interestingly, I have also been working on something very similar to
  307622 [rogerpack200] My question is does anybody know the C code for 'adding' a variable to
  307632 [rogerpack200] It appears impossible [from casual glancing at the code] to add an
  307723 [rogerpack200] Appears that ParseTree and ruby2ruby provide this type of functionality

Regex extracting certain characters
306032 [clement.ow@a] I need a regular expression which can select just 2008 and utilise the
+ 306033 [devi.webmast] I'm not exactly certain, but you may want /\D\/2008$/
+ 306034 [stefano.croc] If the part you're interested with is at the end of the string, you can use
| 306035 [stefano.croc] Sorry, I think I misunderstood what you wanted. You need a regexp which
+ 306043 [botp@de mo t] # C:/Ruby/20080205/2008
  306140 [clement.ow@a] Thank you for all your prompt replies =)
  306141 [botp@de mo t] # What I want to test for is actually just solely '/2008' which can be
  306144 [clement.ow@a] hmmm, for this string I might want to exclude.. Any ideas how it can be

Expression introspection?
306047 [matt@ma ts u] I wonder if anyone has any suggestions for handling a design question

How to determine the current controller?
306048 [sven.gehring] I want to build a generic navigation menu with partials in the style of
306055 [nasir35@go g] you have an instance variable available in your views called

[Mac OS X 10.4.11] unable to upgrade rubygems
306054 [unbewusst.se] download locally rubygems-update-1.2.0.gem
306056 [rick.denatal] ...
306057 [unbewusst.se] $ sudo update_rubygems
306059 [rick.denatal] ...
306060 [unbewusst.se] anyway, thanks for your reply ))

require is not the same in irb as in ruby?
306069 [q8pb97u001@s] $ irb
306071 [q8pb97u001@s] Interesting...
306111 [TimHunter@nc] Print the value of $: to determine the directories in which Ruby will

Threads in JRuby vs standard Ruby
306070 [Guillermo.Ac] This is the first time I am working with threads and so far it gave me a
+ 306073 [ibc@al ax ne] Well, Ruby threads are "green" threads, this is: they only exist into the Ruby
| 306078 [gelios@gm il] Same problem. But i solve it as DRb + fork.
| 306079 [ibc@al ax ne] Could you please give a tip of your solution using Drb + fork?
| 306080 [gelios@gm il] core app starts DRb server with self as front object. then, i fork
| 306081 [ibc@al ax ne] Thanks a lot, it seems interesting.
+ 306128 [charles.nutt] If you would like your app to take advantage of multiple cores without

gem update --system: how to tell if it's making progress?
306076 [boss@ai bl d] Today I decided to upgrade rubygems on my server from 1.0.0 to 1.2.0.
306086 [why@ru y- an] Just unzip (or tar xzf) and run `ruby setup.rb` inside the extracted
306094 [boss@ai bl d] That worked perfectly, and took but a few seconds.

Sequel primary keys
306085 [damnbigman@g] ...
+ 306100 [shortcutter@] So, if int is enforced there is a bug - either in your code or in
| 306110 [damnbigman@g] ...
| + 306114 [caduceass@gm] I don't want to hijack this thread, and people may be mad about me
| + 306149 [shortcutter@] You're welcome.
|   306178 [damnbigman@g] ...
+ 306196 [davebass@mu ] If you mean a floating-point primary key, that doesn't sound like a good
| 306198 [damnbigman@g] ...
| 306201 [rimantas@gm ] The problem with "real world" unique identifiers is that even if they
| + 306215 [damnbigman@g] ...
| | 306263 [rimantas@gm ] Well, the first time you have to handle those side effects in your
| | 306285 [damnbigman@g] ...
| + 306338 [caduceass@gm] You mean schema change, or something else?
+ 306435 [caduceass@gm] Hey Glen, can you give us an answer about whether primary key and
  306438 [damnbigman@g] ...
  306441 [caduceass@gm] Thanks a lot.  I think I'll really look into using the sequel gem!

Server crashes since ruby upgrade
306087 [kd@pa ix co ] I've built ruby 1.8.6-p230 due to vulnerabilities in older versions.
306091 [rst@ai mi .e] It's not just you.  There's been quite a bit of discussion on

Performance improvement possible?
306088 [phil@pr co .] People,
+ 306095 [Rob@Ag le on] Are you looking at all solutions?
| + 306103 [phil@pr co .] Rob,
| + 306225 [phil@pr co .] Rob,
|   306237 [cremes.devli] Phil,
|   306243 [phil@pr co .] Chuck,
|   306255 [Rob@Ag le on] OK, even knowing that it started as shell+C, it needs help ;-)
|   + 306306 [phil@pr co .] Rob,
|   | 306316 [Rob@Ag le on] Ruby v1.8
|   + 306333 [eleanor@ga e] A further modified version of statz which should changes the way IO is
|     306345 [phil@pr co .] Eleanor,
|     306350 [eleanor@ga e] Paste in haste, repent at leisure ;)
|     306357 [phil@pr co .] Ellie,
|     + 306358 [shevegen@li ] Is it only me or is that profiling tiresome and arduous?
|     + 306368 [eleanor@ga e] I'm surprised at the behaviour you're seeing so I ran a quick
|       + 306371 [znmeb@ce ma ] Not to mention directory fragmentation in many filesystems. :) I'd be
|       | 306384 [phil@pr co .] Ed, Ellie et al,
|       + 306381 [phil@pr co .] Ellie,
|       | 306389 [eleanor@ga e] Your experience runs counter to all of my experience, both in terms of
|       | 306413 [phil@pr co .] Ellie,
|       + 306399 [shortcutter@] This can't be the exact code you were benchmarking since "x" is
|         306401 [eleanor@ga e] I was using IRB and x was already defined earlier in my session, so
|         306417 [shortcutter@] Ooops, right you are.  I missed that bit completely.  Hopefully you got
|         306418 [eleanor@ga e] Mental note to self: do _not_ start fiddling in IRB at bedtime ;)
|         + 306486 [ryand-ruby@z] nonsense... just don't post your results. ;)
|         | 306492 [eleanor@ga e] lol
|         + 306488 [shortcutter@] robert
+ 306096 [ara.t.howard] post your code.
| 306104 [phil@pr co .] ara,
+ 306097 [tim.pease@gm] The general approach I've followed is to write the code in Ruby, see
| 306105 [phil@pr co .] Tim,
| 306108 [tim.pease@gm] Yes
+ 306099 [shortcutter@] Difficult without seeing the Ruby program.  But I'd also start with
  306106 [phil@pr co .] Robert,

IRB not finding "rubygems"
306090 [bhutchins@te] This an odd one.
+ 306092 [stefano.croc] The value returned by require doesn't tell whether there was an error or not
| 306098 [bhutchins@te] Hmmm . . . then I have a different problem.
| 306112 [stefano.croc] That's because rspec doesn't provide a rspec.rb file but a spec.rb file. So
+ 306093 [ibc@al ax ne] ~$ irb

Question concerning TkText list
306101 [htruax@st .c] ...
306152 [nagai@ai ky ] Please use TkTextTag.

dbi connection
306107 [aidy.lewis@g] Could anyone please tell me where I place the database name in this
+ 306113 [aidy.lewis@g] I seem to be getting a connection
+ 306115 [aidy.lewis@g] Panel

COBOL copybook parser
306118 [todd.chamber] Does a Ruby parser for COBOL exist?  I've done some cursory searches

Difference between site_ruby and gems
306121 [caliwildman2] I am trying to understand the difference between site_ruby (Ruby
306132 [jan.svitok@g] site_ruby is directory for global addons for ruby.
306143 [caliwildman2] Thanks for the confirmation, I subsequently found out that same thing

Problem with Array#delete ?
306122 [djberg96@gm ] In messing around with Array#delete I think I've uncovered a problem.
306126 [rick.denatal] ...
306129 [rick.denatal] ...

[ANN] Trollop 1.8.1 released
306133 [wmorgan-ruby] Trollop version 1.8.1 has been released! http://trollop.rubyforge.org
+ 306138 [wmorgan-ruby] William <wmorgan-ruby-talk@masanjin.net>
+ 306156 [matt.mower@g] Should we be afraid?
  306262 [raasdnil@gm ] Nyah... from what I've heard it's just a bunch of trollop anyway...

File access
306134 [tekmc@ho ma ] writeable only through my program.
+ 306136 [ibc@al ax ne] In which file system and operating system?
+ 306150 [shortcutter@] ...

[ANN] Waves 0.7.5 (Janus) Release
306142 [dan@ze aw b.] ...

Creating a variable based on array
306151 [nonstickglue] Basically my program automates file creating based off arrays at the
+ 306155 [jgabrielygal] If I understood correctly you want to generate a set of files, that are
+ 306160 [shortcutter@] I am not sure what you mean here.  Of course you can initialize the
  306463 [nonstickglue] Thank you both for your replies. :) I used the 2nd one and it worked
  306466 [s.korteling@] array = colors.map do |color|
  306468 [nonstickglue] Thanks, everything is working. :D
  306470 [sarah@su ve ] GOOD ,IT IS USEFUL

ruby 1.8.6 p230 - really a fix?
306157 [hramrach@ce ] reading http://www.rubyinside.com/june-2008-ruby-security-vulnerabilities-927.html
+ 306158 [maga1982@gm ] ...
| 306159 [sumayah.hame] unsubscribe
+ 306191 [gdonald@gm i] Geez.  I've spent my last two evenings trying to figure out why I
  306210 [ottoman01@gm] It kind of looks like alot of rails things are broken via this ruby

v1.9 -rprofile -rdebug errors
306164 [phil@pr co .] People,
306246 [rogerpack200] 1.9 lacks profiling and debugging, currently, AFAIK.  I know ruby-debug
+ 306250 [phil@pr co .] Roger,
+ 306251 [jeremy@bi sw] The latest ruby-debug does support 1.9, but it's incomplete yet.
| + 306293 [rocky.bernst] ruby-debug doesn't work in 1.9; my estimate is that it will be a while
| | 306307 [jeremy@bi sw] It does work, but is in, uh, 'alpha' form :)  I've been using it for a while.
| | + 306363 [rocky.bernst] ebug
| | + 308366 [rogerpack200] Is there a location we can get to that?
| |   308382 [rocky.bernst] Over time 1.8.x over time will be getting some of the 1.9 goodness.
| + 306328 [rogerpack200] For some reason I can't get svn trunk to compile.  Or for rake to work,
+ 306252 [rogerpack200] I take that back.

New Version of IBM_DB Rails Adapter/Driver now available
306165 [praveendevar] New version of IBM_DB, the Rails Adapter/Driver for IBM DataServers,

how do i unsubscribe?
306166 [fredchingota] ...
306167 [shortcutter@] Please look at the headers of a ruby-talk email.
306171 [ondemannen@g] X-ML-Name: ruby-talk
306172 [shortcutter@] List-Id: ruby-talk.ruby-lang.org
+ 306174 [ondemannen@g] grrr ... I'll have to learn to use page-down key.
+ 306181 [rick.denatal] ...

displaying result of *.rb files onbrowser
306169 [vinayhk00@gm] i am new to ruby. i hav installed ruby gems. even webrick server is

displaying result of *.rb files on browser
306170 [vinayhk00@gm] i am new to ruby. i hav installed ruby gems. even webrick server is

Question on passing blocks
306182 [twscannell@g] In the code below, a block, { x += 1 } is magically passed to
+ 306186 [rmagick@gm i] In the first case, x in the block refers to the x defined outside the
+ 306187 [sepp2k@go gl] You're passing a block that takes one argument (x) to a method that yields=
  306190 [twscannell@g] Thank you,

File writing
306183 [tekmc@ho ma ] previous data. How can I add new items to an existing document without
+ 306184 [rmagick@gm i] Use "a" instead of "w". That will Append new data to the end of the
+ 306188 [mikeisgreat@] filename = File.open("test","a") do |f|
  306189 [tekmc@ho ma ] Thank you!
  306192 [tekmc@ho ma ] Posted via http://www.ruby-forum.com/.
  306194 [tekmc@ho ma ] ...delete an item and take the now empty line away

Deleting a line in a file
306197 [tekmc@ho ma ] afterward?
+ 306199 [shevegen@li ] There are many ways to solve this.
| 306200 [tekmc@ho ma ] <-- empty space
| 306202 [shevegen@li ] This should get you started. There are probably 1000 ways but well,
+ 306209 [Reid.Thompso] grep -v "character string unique to line to be removed" file > tmpfile
+ 306302 [koflerjim@ma] /bin/ed -s file.txt <<< $'/b/d\nw'   # delete first line containing "b"

Release of 1.9.1
306203 [emarthinsen@] Sorry if this is an old question, but does anyone have a sense of when
+ 306206 [matz@ru y- a] Ko1 announced at the RubyKaigi conference last week that it would be
+ 306207 [cremes.devli] Rumor has it that interim version (1.9.0-x where x is a number) will
  306213 [emarthinsen@] Thanks. I was hoping for something a little sooner, but oh well. Thanks