364829-385793 subjects 365280-411659

Using RubyGems
365009 [abder.rahman] What does (find) in require 'find' do?
365010 [ben@bl yt in] It tells Ruby to process the contents of the file called "find.rb" in
365011 [abder.rahman] Ben,
365012 [ben@bl yt in] It allows you to recursively find files in a directory, yes.
365014 [abder.rahman] Thanks Ben.

 Re: Net::SCP download from windows to linux and encrypt password
365017 [uwe@ku os h.] ...

365020 [joelvanderwe] Please, let's all just leave this thread alone.
365025 [echristopher] Sorry, didn't mean to continue a bad thread (and especially since this

active_support classify truncating
365028 [dhf0820@gm i] I tried to use "my_class".classify and got MyClas as a result. Tried
365027 [dhf0820@gm i] Additional doing "my_clas".classify returns "MyCla"

Taking out text between symbols and joining together
365030 [knightplayer] I have some text files that I would like to extract text from, then join
365033 [jgabrielygal] First of all, your document doesn't parse well, because it has two root nodes.

autotest idea
365035 [ryand-ruby@z] whatcha think?

pathname.rb:270: warning: `*' interpreted as argument prefix
365039 [sentinel1879] /opt/local/lib/ruby1.9/1.9.1/pathname.rb:270: warning: `*' interpreted
+ 365045 [b.candler@po] Can you post line 270 of that file, with a few lines of context?
| 365099 [sentinel1879] #!/usr/bin/ruby19 -w
+ 365048 [josh.cheek@g] It is a warning to let you know that it considers what you typed to be
  + 365056 [b.candler@po] It's just the "splat". AFAIK it's not really an operator and is not
  | 365113 [josh.cheek@g] I am still unsure what it is, I think that when it is parsed, it just
  + 365100 [sentinel1879] Okay, i've put a parens around the *args. I no longer get the warning.
    365101 [josh.cheek@g] You aren't, you probably see them because your warning levels are different
    365102 [jgabrielygal] I'm on gmail too, and I see 7 posts in this thread: 3 from RKumar and
    + 365103 [jgabrielygal] .com
    | 365104 [josh.cheek@g] 2010/7/1 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>
    + 365110 [b.candler@po] That's OK, my mails are usually trash anyway :-)

optparser question
365041 [youhaodeyi@g] I am using optparser to parse arguments.How can I set a mandatory
365044 [shortcutter@] There are no mandatory options - after all, they are _options_.  You

365051 [rtf.iya@gm i] have idea with this.Is there a free tutorial for this one?.
+ 365053 [jgabrielygal] It has some "Get started" tutorials, and links to books and documentation.
+ 365079 [sroach@in es] You might also try www.rubylearning.org

Best practices resource/guidance for strings
365052 [cschaller@gm] I am working with scraping quite a bit of data and I would like to make
+ 365054 [peterhickman] Personally doing things on one line is not a sin of itself. Only when it is
+ 365055 [b.candler@po] (You need gsub! and capitalize! of course)
| 365060 [cschaller@gm] Thanks so much for the help and guidance.  Most of my data is parsed
+ 365094 [josh.cheek@g] I don't know about a specific site, but if you do not need to keep the value
  + 365120 [cschaller@gm] Awesome guidelines.  Thank you so much for taking the time to write this
  + 365229 [josh.cheek@g] This is wrong,  delete removes the intersection of characters, you do need

Re: RubyGems 1.3.7
365058 [rogerpack200] Hmm.  Perhaps it could use a bit more IR love?
365065 [luislavena@g] ll
365071 [rogerpack200] Appears that currently you can't update it by running setup.rb,
365077 [gthiesfeld@g] I was getting the same error.  Will Green posted a fix on his blog

Threading with Activerecord
365059 [jk@jo yk or ] First, let me give a little background. I have two applications, which

Aliasing classes
365063 [sshaikh@ho m] Is it possible to alias a class? That is for ClassA.run to call
365073 [jacob.d.mitc] Yes, you simply set some variable equal to the name of a class and then in

Preferred Gem building utility
365076 [jose.halesga] ...

365080 [alumsimporta] Please could some on help me with a code to download an audio file in
365081 [sophrinix@gm] Are you trying to stream a MP3 or are you trying to download it no
365128 [alumsimporta] I am trying to download it and save it locally.  the file is in mp3
365130 [jonathan@jm ] the console.  Since it's all binary data, this is not very useful.
365131 [jonathan@jm ] -Jonathan Nielsen
365137 [alumsimporta] Thanks.
365138 [joelvanderwe] Make sure you open the file with "wb" instead of "w" to use binary mode?
365140 [alumsimporta] require 'net/http'
+ 365161 [josh.cheek@g] require 'open-uri'
| 365196 [alumsimporta] Thanks bro,
+ 365222 [me@xi uc or ] the url is redirected.

drb problem?  ringy-dingy won't answer...
365095 [patrick.m.ne] The following code works fine as long as I don't try to run it through

[ANN] Ruby Hoedown 2010 Registration Open and CFP Closing Soon!
365098 [jeremymcanal] Just wanted to drop a reminder here that the CFP for the Ruby Hoedown

Synchronized Circular Buffer
365105 [mail@sa da t] I'm relatively new to Ruby, having switched from a PHP and Java
365108 [shortcutter@] The line above must be moved into the synchronized block.
365114 [mail@sa da t] Thanks for the help, it works perfectly now. I see that I should treat
365117 [shortcutter@] Not necessarily.  The synchronized block must be only as long as

Fast searching of large files
365112 [stuart.clark] Hey all,
+ 365115 [m.fellinger@] File.open('qimo-2.0-desktop.iso', 'r:BINARY'){|io|
| + 365116 [shortcutter@] If you only need to know whether the string occurs in the file you can do
| | 365144 [brabuhr@gm i] => true
| + 365118 [stuart.clark] Thanks.
| + 365136 [joelvanderwe] Actually, pos will be the position of the end of the line on which the
+ 365145 [rogerpack200] a fast way is to do it in C :)

ANN: Sequel 3.13.0 Released
365125 [code@je em e] Sequel is a lightweight database access toolkit for Ruby.

send_file sends an empty file to browser
365139 [devin.cormie] I'm using merb as a framework but I suspect the issue is related to ruby

Running a shell command from ruby
365147 [stevepauly@c] I am experimenting with running bash commands from within ruby. The
+ 365157 [jeanjulien.f] to
| 365172 [stevepauly@c] Yes. It is where the ruby script is stored so I know it exists.
+ 365165 [briankbuckle] Your block is not being called. I think the output you are seeing the is
| 365173 [stevepauly@c] Brian, you were right.
+ 365167 [josh.cheek@g] It has to do with block bindings. do ... end bind to the furthest left
  365169 [josh.cheek@g] Here is a solution that creates the files.
  365174 [stevepauly@c] My idea, as a learning exercise only,was to prove to myself that I could

ANN: zozo 1.0.0 Released
365148 [code@je em e] = What?
+ 365166 [jbarnette@gm] I appreciate the work you've done here, but I'd also be delighted to =
| + 365178 [code@je em e] I'm sorry if I implied that rubygems is wasteful with memory.  By "not
| + 365213 [rogerdpack2@] some comments or patches to help improve RubyGems' memory footprint. Did y=
+ 365212 [rogerdpack2@] Fascinating.
  365215 [code@je em e] I tried to get Rails to work with zozo for a few hours and gave up.

FasterCSV - write tab delimited files
365149 [cschaller@gm] I'm using FasterCSV to write out a tab delimited file.  For empty
365150 [james@gr ys ] The behavior you describe, not quoting empty fields, is the default for =

Handling File.open exceptions
365151 [carljenkins@] I was reading the pick axe book (for 1.9 version of ruby) and on page
365155 [shortcutter@] Does this help?
365171 [carljenkins@] Yes - thanks that does help.
365179 [shortcutter@] Good.
365183 [carljenkins@] Alright, but I guess what I am missing is HOW do we handle the
365189 [shortcutter@] obustness.html

[Q] synchronize a "mocked" clock in a distributed system
365153 [cremes.devli] I've been banging on a problem for a few days now and don't feel any closer to solving it. I'm hoping some of the big brains on the ruby ML can shed some light. Following are a few paragraphs with a brief system overview before I state the problem. I apologize in advance for this question being only tangentially related to Ruby the language. :)
+ 365158 [shortcutter@] A very simplistic solution would be to use DRb and have a centralized
| 365218 [robert.dober] ck.
+ 365164 [tony.arcieri] It sounds like the way you've written your program is time-dependent, or as
  365202 [cremes.devli] Yes, I suppose it is strongly timed. I didn't realize that was going to be such a problem.
  365278 [wruyahoo05@c] Could you setup a mock NTP time source that supplies "fast" time to its
  365282 [robert.dober] I have heared that being killed by a sysadmin is a terrible fate ;)
  365286 [cremes.devli] The idea of using a hacked NTP daemon to speed up the clocks in not feasible. Interesting idea though...
  365287 [tony.arcieri] Why can't the "central time" be maintained by whatever process is scattering
  365291 [cremes.devli] Because there is no centralized server that all messages, data or control must pass through.
  365349 [tony.arcieri] If your system is fully asynchronous and there's no central data source, how
  365352 [cremes.devli] And then it hit me. I could have a mock clock process that subscribes to all of those data sources and receives all of those messages. The mock clock should *only* pay attention to the document data with the smallest time granularity for setting the clock and ignore the rest.
  365364 [tony.arcieri] Cool, glad I could help

[ANN] SmartImage 0.0.3 - simple yet powerful cross-platform thumbnail  generation and image manipulation in Ruby
365162 [tony.arcieri] "It's like a Swiss Army Knife for images, but one of those tiny ones you can
365163 [tony.arcieri] Mea culpa, forgot to include a link.  SmartImage is available via

[ANN] isolate 2.1.0 Released
365168 [jbarnette@gm] Isolate version 2.1.0 has been released!

Problem with Mail gem: bounced and error_status return nil
365170 [hgtesta@gm i] I must be missing something about Mail gem, bounced? and error_status

FasterCSV - Merge CSV
365181 [christian.es] I have 3 CSVs with the same content with say 10 rows. There is a slight
365186 [b.candler@po] Why use fastercsv?
365194 [Rob@Ag le on] except that you'd have headers from csv2 and csv3 (but perhaps your
365204 [christian.es] If the files are small-ish, you can avoid a chicken-and-egg problem of
+ 365206 [reid.thompso] just cat and grep out the header lines
+ 365207 [Rob@Ag le on] OK, let's read them all in and then write out one file...
  365210 [brabuhr@gm i] FasterCSV.open(output_file, 'w') do |ocsv|

Requiring files in a module context
365182 [daniel.varta] A short example: http://gist.github.com/461094
365195 [ljjarvis@gm ] You can't do this with require. You probably want module_eval
365232 [daniel.varta] It works, thanks!

[ANN][Security] Ruby 1.9.1-p429 is out
365184 [yugui@yu ui ] Ruby 1.9.1-p429 has just been released. This is a patchlevel release for
+ 365191 [shyouhei@ru ] Let me tell you a bit more about it.  This bug does exist on 1.8, but it =
+ 365192 [chastell@ch ] Given that 1.9.2-preview3 is vulnerable,

[ANN] Ruby 1.9.2 RC1 is out
365185 [yugui@yu ui ] Ruby 1.9.2 RC1 has just been released. This is a release candidate of

web service client?
365190 [bdloving@gm ] Just been handed a project to use a 3rd party web service API, but all
365217 [mark@wi ho t] You could try soap4r: http://dev.ctor.org/soap4r

Pb install Ruby 1.9.1
365197 [alexandre.to] I tried to delete Ruby 1.8.7 and then install the 1.9.1 but something is
365199 [alexandre.to] Cool I fixed it with http://rubyosx.rubyforge.org/

Ruby/DL problem
365198 [blackapache5] I have very little experience with dl. But I want to use it to
+ 365205 [gthiesfeld@g] ce this
+ 365225 [blackapache5] hmm, nobody here using Ruby.DL ?
  365226 [luislavena@g] .org>

Limit Ring server to localhost only.   RingFinger.new('localhost')   apparently doesn't work
365208 [patrick.m.ne] Am using RingyDingy.

[OT] RubyGoLightly Progress Report
365214 [eleanor@ga e] I seem to have been missing in action for the best part of six months so =
+ 365221 [shortcutter@] Elli, thank you for the elaborate report!  I am not sure I get every
| 365240 [eleanor@ga e] detail (mostly because I do not know Go and a few other languages you =
+ 365224 [martindemell] I thought it was about time I put together a progress report and pimped the=
| + 365236 [shortcutter@] yemacs?  SCNR
| | 365249 [martindemell] the
| + 365244 [eleanor@ga e] so I thought it was about time I put together a progress report and =
|   365250 [martindemell] ndling and first-class meta-programming support, but it's a remarkably prod=
+ 365353 [cremes.devli] Perhaps this will be of some interest?
| + 365354 [default@sp r] so many vaporwares with so little time on hands... which ones should I
| | 365355 [cremes.devli] Heh. :)
| + 365357 [eleanor@ga e] so I thought it was about time I put together a progress report and =
+ 365441 [headius@he d] An eminently entertaining post! I think there's even a few areas
  365453 [eleanor@ga e] Glad you enjoyed it :)

redirect_to(user_contacts_path(@current_user))  error
365216 [aashishkiran] redirect_to(user_contacts_path(@current_user)),
365238 [ken70r@gm il] can you provide the error message???
365254 [thiagown@gm ] Couldn't find Contact without an ID
365255 [thiagown@gm ] by looking at ur code its probably because(i'm no rails expert or

How to easily upgrade to new Ruby 1.9 patch level
365219 [alex.decaria] I currently have Ruby 1.9.1 p378 installed on Windows.  If I want to
365223 [luislavena@g] Are you using RubyInstaller releases?
365227 [alex.decaria] RubyInstaller for p429 is released I can just do the 'uninstall Ruby
365252 [luislavena@g] Correct.

Tell me what could be wrond:)
365220 [caminorojo7@] I'm trying to learn this language,two days now,and it already gives me
+ 365228 [sutniuq@gm .] The code looks fine to me. Try running it from the command line (you can
+ 365251 [yermej@gm il] If this is the actual code you're trying to run, it's broken because

[Ruby Package Standard] name correspondence
365230 [transfire@gm] That being the case I think Ruby needs to include methods to make it

Permanent script hosting ?
365231 [darksniper20] I need a ruby script to be permanently up, but can't host it on my PC as
+ 365234 [m.fellinger@] Or do you mean running it?
+ 365235 [sora134@gm i] Hmm, "hosting" is "distribute a script" or "host application (cgi or
+ 365239 [darksniper20] Indeed, I didn't specify what kind of hosting i needed sorry.
  + 365241 [sora134@gm i] Hmm... Sorry, I'm japanese so i don't know web hosting space not in Japan...
  | 365242 [darksniper20] It's ok ^^ Thanks for replying anyway :D
  + 365245 [richard.conr] That could be tricky enough. CGI isn't a common way to deploy Ruby apps.
  + 365246 [josh.cheek@g] Can we see your script? It might be simple to get it to conform to rack.
  + 365290 [ninja@sl ph ] You don't need Rails. Sinatra would work. Any Rack-based framework would work.

.irbrc location/path
365233 [knarayanan88] I want to place *.irbrc* config file in a folder in */tmp* or any other

High Revenue Keywords
365243 [m.1ahesh@gm ] Check Out High Revenue Keywords In All Niche's At,

Garbage Collection on Windoze
365247 [thyresias@gm] Minasan konbanha
+ 365248 [shortcutter@] There is no guarantee for GC.  For efficiency reasons most GC
| 365259 [thyresias@gm] Thanks Robert, I kind of had this reservation in the back of my head, so
| 365266 [shortcutter@] There is generally no way to control when an object will be collected
+ 365276 [rogerpack200] Yeah get the same thing here.  It's the nature of conservative GC.
  365289 [rick.denatal] vative
  365294 [rogerpack200] Hmm.  Perhaps our definitions of conservative differ?  To me
  365302 [thyresias@gm] I keep thinking there is something to dig in this, but unfortunately I

strange xpath output
365253 [myocean135@y] <ul id="ul_list">
+ 365256 [aaron@te de ] "//ul" says "find all ul tags anywhere in the document".  It looks like
+ 365258 [shortcutter@] That's perfectly expected.  If you look closely at the eplanation,

Charset Detection
365257 [shea@sy ac .] Is there any existing functions or external gems that can take a generic
365264 [b.candler@po] Not answering your question directly, but this syntax is specific to
368568 [shea@sy ac .] heres the method I created in case it is useful to anyone else..

speeding up "gem1.9 install" during development
365260 [sentinel1879] During development, I keep running rake install. The following command
+ 365269 [luislavena@g] On Jul 5, 2:58=A0am, "R.. Kumar 1.9.1 OSX" <sentinel1...@gmail.com>
| 365270 [sentinel1879] rake install - runs gem1.9 install and that's where the time goes (when
| 365272 [luislavena@g] On Jul 5, 10:48=A0am, "R.. Kumar 1.9.1 OSX" <sentinel1...@gmail.com>
+ 365273 [b.candler@po] Try with --no-ri --no-rdoc
  365274 [sentinel1879] gem1.9 install --no-ri --no-rdoc  ./pkg/....
  365279 [sentinel1879] Currently, since my Rakefile is generated by Jeweler, i found that it

How to POST Form Data?
365261 [darshna.17@g] I am trying to post the form (http) from the below html "test.html" and

File data extraction
365262 [rolfhsp@gm i] Save Format v3.0(19990112)
+ 365263 [b.candler@po] p src.scan(/^@begin(.*?)^@end;/m)
| 365267 [rolfhsp@gm i] Thanks Brian, that helped me a lot ! :o)
| 365268 [b.candler@po] That's the most important thing :-)
| 365275 [shortcutter@] If files are large than the line based approach is usually more
+ 365281 [w_a_x_man@ya] act
  365380 [rolfhsp@gm i] The use of flip flop operator opened a new door for me. Didn't know of this

Re: name correspondence
365265 [b.candler@po] Perhaps you're thinking of camelize and underscore in
+ 365271 [rick.denatal] =3D> "ActiveRecord"
+ 365277 [transfire@gm] Oh? My bad, I thought it had #pathize  and #methodize too.