282040-346181

281787-344488 subjects 282291-283016

ruby 1.9 woes
282040 [brandon.g.jo] I'm running on Solaris and am having trouble building ruby 1.9.
282110 [nobu@ru y- a] In general, auto-generated files aren't in the repository.
282191 [brandon.g.jo] Thanks for the assistance.  I'm getting a crash when miniruby tries to
282198 [brandon.g.jo] SunOS dstnsun0 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire
282201 [nobu@ru y- a] th is broken?
282208 [brandon.g.jo] It would seem so.  It's the ruby thread passed to vm_call0() in vm.c

problem using ruby with c++
282047 [teofilo.dutr] ...
282091 [teofilo.dutr] ...

Re: Ruby idiom equivalent to Perl "$asdf = $ARGV|| die 'arg
282054 [rmagick@gm i] "abort" and "kill" are way too negative and violent. I use
282058 [shevegen@li ] How about

eruby & ruby cgi, are they "safe"?
282057 [kyleaschmitt] Programming errors asside (sql injection, running uploaded files, not
282068 [alex@du ae c] I've found eRuby to be extremely safe and stable for use over the web.

unexpected return (LocalJumpError) when forking off a rake process
282062 [hans.sjunnes] I've written a small ruby cgi script which allows me to fork off a
+ 282065 [hans.sjunnes] ruby 1.8.5 (2006-08-25) [x86_64-linux]
+ 282069 [stefano.croc] I think this is not related to rake. The problem is that you are using retu=

rubygems 0.9.5 install issue
282064 [kyleaschmitt] I was attempting to install rubygems on a machine that has, and
282095 [contact@th r] I just had the exact same problem and solved it by installing/compiling
282243 [kyleaschmitt] John, I'm not sure I follow about compiling it in a directory in your
282249 [contact@th r] I copied the install files to /usr/local and installed it there and got
282366 [kyleaschmitt] *cough cough*
282368 [contact@th r] so you're up and running?
282418 [kyleaschmitt] Hu.  I thought the rebuild with no errors was proof it was good, but
282428 [contact@th r] Kyle...it doesn't seem to be over for me...
282566 [kyleaschmitt] Err, without knowing that library, are you sure it's not

I think this is cool, ruby iterators and continuations
282067 [wbsurfver@ya] =begin
282156 [MonkeeSage@g] I'm not sure how useful it is to signal failure in the block of

PDF Reader
282075 [snoopy1990@g] Hey,
282077 [dvohra09@ya ] ...
284971 [snoopy1990@g] I found a much easier solution! Just force the pdf file to be opened in

[ANN] Webby 0.6.0 released
282076 [tim.pease@gm] Webby is a super fantastic little website management system. It would

for loop iterator, next object
282079 [lpgauth@gm i] for user in @Users
282081 [mental@ry ia] Of course.  But what do you want to happen when you're at the end
282083 [mental@ry ia] prior = nil
282088 [lpgauth@gm i] I figured it out... You can use in_group_of
282093 [cvonkleist@g] require 'enumerable'
+ 282119 [fourfifty@gm] users.each_with_index do |user, index|
| 282121 [cvonkleist@g] I think using each_with_index that way will give behavior like each_cons.
+ 282687 [shortcutter@] irb(main):001:0> %w{a b c}.each_cons(2) {|*a| p a}

ruby and quicktime??
282084 [Chris.Killim] I know you can interact with the quicktime player via ruby, but why
282104 [has.temp3@vi] QTKit is accessible via RubyCocoa.
282223 [Chris.Killim] Thank you for the reply.  I will check out RubyCocoa.  Are there any

[ANN] god 0.6.0 released (and mailing list)
282092 [pubsub@ru yi] ...
282144 [chiology@gm ] Looks very cool. I look forward to playing with it.

Re: Packet : A Pure Ruby Library for Event Driven Network Programming
282094 [tad.bochan@b] I was trying out "packet" tonight, but failed at the starting block with
282098 [ezmobius@gm ] Windows does not support UnixSockets. Therefor packet does not run on
282122 [no@sp m. le ] It wouldn't be hard to use Named Pipes instead, which are the Windows equivalent.
282148 [gethemant@gm] Never used them, but I will have a look at see, what can be done about
282167 [jameskilton@] ...

SSL not installed error when trying to install Rails w/ gem
282097 [contact@th r] I got ruby and gems installed on Red Hat, then updated gems.
282105 [contact@th r] Assuming your source is at /usr/src/ruby-1.8.6

I consider this a bug in Ruby...
282100 [ihatespam@ho] # This should be 1 followed by 13 zeroes...
+ 282118 [nobu@ru y- a] Yes, and performance issue.
| + 282132 [ihatespam@ho] Just so I'm clear on this; the Range class is implemented in C for
| | + 282138 [nobu@ru y- a] about your "limitation."
| | | 282183 [ihatespam@ho] Where did you write about this?  I'd be happy to read it...
| | | + 282192 [MonkeeSage@g] On Dec 5, 7:40 am, "Just Another Victim of the Ambient Morality"
| | | + 282209 [gerardo.sant] On Dec 5, 2007 7:46 AM, Just Another Victim of the Ambient Morality
| | |   282213 [ihatespam@ho] Rubinius is a virtual machine implementation.  I'm not sure how this
| | |   282217 [gerardo.sant] On Dec 5, 2007 10:40 AM, Just Another Victim of the Ambient Morality
| | + 282143 [charles.nutt] Perhaps not yet, or not 1.8.6. But this is going to change.
| + 282195 [matz@ru y- a] Commit the patch, please.
+ 282127 [botpena@gm i] On Dec 5, 2007 7:40 AM, Just Another Victim of the Ambient Morality
| 282135 [ihatespam@ho] In what way is Range expensive?  Why is it so expensive?
+ 282178 [lloyd@2l ve ] fyi, to help with counting zeros, you can use an underscore like a

Re: rubyforge 101
282108 [tom@in oe he] To summarize - there's an hourly (oops, I need to update that frequency
282109 [jmettraux@op] simply provide a .gem in the release, and it will be available a bit

@@IDENTITY
282120 [four_mrperfe] I can't seem to find any resources which tell me how to do the
282128 [four_mrperfe] doesn't anyone know how to retrieve the id of the last inserted record,
282134 [no@sp m. le ] It's not that, it's that no-one tends to respond quickly to folk who don't
282140 [four_mrperfe] First off, thanks for your reply.  If it's the case the people haven't
282151 [alex@bl ck e] It's also worth mentioning that your initial request and follow-up were
282185 [four_mrperfe] GREAT!  Thanks, Alex!

Ruby works but not JRuby - when using MySQL Driver
282123 [venkatesh.ma] Here is the simple Ruby program that works with "Ruby" but gives an
+ 282126 [superist_joe] ...
+ 282142 [charles.nutt] The pure Ruby MySQL driver should be fine, but it looks like you've got
  + 282146 [charles.nutt] Or of course you could use JDBC directly. The API is pretty clean, a lot
  + 282170 [venkatesh.ma] I installed this driver using "gem install mysql". I suppose this will
  + 282186 [venkatesh.ma] I am not able to make the pure Ruby Mysql driver work. I am getting
    282187 [venkatesh.ma] According to the information here, pure Ruby MySQL doesn't work with
    282257 [charles.nutt] That's unusual, since rails works fine with the pure-ruby mysql driver.
    282271 [venkatesh.ma] Yes. Please send me any examples you may have. I already got one from
    282286 [charles.nutt] Here's a very simple example to get you into the JDBC frame of mind.

Shoes questions
282139 [schmode93@ya] Alright i know that its possible to "getkeys" and set commands for the
282150 [why@ru y- an] Oh, Erik, if you want to join the Shoes mailing list, we'll take

Rubygems 0.9.5 and fastthread mswin32 gem
282153 [damphyr@fr e] Is there a binary gem for fastthread on windows?
282173 [luislavena@g] Yes, there is.
282181 [damphyr@fr e] I can undertsand that :). I guess I can get the binary gem and install
282228 [luislavena@g] Hoe set the platform to the gem specification to Gem::Platform::RUBY
283036 [a.holstvoogd] I have the same problem, but i am using 0.9.4.
283048 [luislavena@g] On Dec 11, 10:05 am, Arthur Holstvoogd <a.holstvo...@nedforce.nl>

UTF-8 and printf
282154 [jldiaz@gm il] I'm trying to use printf to give a tabulated format to my output, like
282184 [MonkeeSage@g] Unfortunately, I think you'll have to use something ugly like this...
282455 [jldiaz@gm il] Hey, thank you very much. The trick of unpack to find the string
282457 [MonkeeSage@g] Not really a bug, just that 1.8 doesn't have native unicode support.
282458 [jldiaz@gm il] I understand. That's why I put "bug" in double quotes
282495 [MonkeeSage@g] IIRC, ruby wasn't created with unicode support because unicode is less

iconv problems with different machines
282155 [nappin713@ya] ic = Iconv.new('US-ASCII//TRANSLIT', 'UTF-8')
+ 282159 [nappin713@ya] Actually I found some other posts about this same issue from awhile
| 282160 [fxn@ha hr f.] I have not been able to understand where is exactly the difference,
| 282248 [nappin713@ya] I like that solution even better.  Thanks for sharing!
+ 282258 [gmane@au bu ] Raymond O'Connor said...

How are methods being excecuted?
282157 [saladin.mund] I'm working on a method which should manipulate the excecution of the

what's wrong with these calculations?
282161 [caifara.subs] I thought, why search for two hours being totally frustrated if I can
+ 282163 [caifara.subs] Ok
+ 282165 [gethemant@gm] sprintf("%.2f",(73.07-64.00)).to_f
| 282166 [gethemant@gm] class Float
| + 282168 [jameskilton@] ...
| + 282189 [phrogz@ma .c] Note that, due to the nature of floats, calling to_f on that string
|   282190 [jameskilton@] ...
|   282196 [phrogz@ma .c] irb(main):002:0> require 'bigdecimal'
+ 282204 [caifara.subs] Thanks to everyone helping to find me/us a nice solution.

redirect to pdf
282164 [sebastian.bo] in folder public/pdf I have a file "test.pdf"
+ 282177 [halostatue@g] =85that you're asking a Rails on ruby-talk. I also suspect that a Google
+ 282254 [perrin@ap th] Are you sure that leading / is supposed to be there?  Maybe it should be

Expanding array as function arguments
282171 [rugowski@nh ] I wonder if it is possible to expand array as function arguments. Like
+ 282174 [sgilperez@gm] foo *[1,2,3]
| 282180 [rugowski@nh ] Thnx a lot ;)
| 282194 [MonkeeSage@g] A note on splat; it can be used to both gather and unpack elements,
+ 282175 [shortcutter@] foo *[1,2,3]
+ 282176 [rimantas@gm ] How about foo *[1, 2, 3] ? (Note the "*" -"splat").

hash
282193 [stu_09@ho ma] - reads a text file
282199 [shortcutter@] Why do you repost the same question when you got answers already?  Are
282203 [stu_09@ho ma] i wasnt sure i had recieved the answers i was looking for. I was
282210 [MonkeeSage@g] If you don't understand or don't find an answer sufficient, say so in
282250 [stu_09@ho ma] thanks, i've got it to print out the hash
282253 [MonkeeSage@g] ^ This part is pointless now. $linecount above is equal to
282255 [stu_09@ho ma] cheers.
282263 [phrogz@ma .c] case just fine. Please read through the code and understand it. You
282264 [MonkeeSage@g] Sorry about that Phrogz. I didn't read the other thread, I just
282267 [phrogz@ma .c] Absolutely no need for an apology. Helping people isn't a competition
282269 [stu_09@ho ma] hey guys
282278 [MonkeeSage@g] Nah! Any mistake you might make, we've already done that and worse
282285 [stu_09@ho ma] thanks mate.
282289 [stu_09@ho ma] oh wait...iv solved it

Fwd: Please Forward: Ruby Quiz Submission
282197 [james@gr yp ] ...

rubygems/rubyforge question - release, package, group?
282202 [rsanheim@gm ] Could someone please explain the difference between a release, a
282212 [ben@bl yt in] * group: the project name

win32/process problem
282205 [christian.ke] I have an application that consists of serveral independent parts.
282214 [djberg96@gm ] On Dec 5, 8:28 am, Christian Kerth <christian.ke...@dynamicmedia.at>
282322 [christian.ke] Win32: 0.5.4 (updated yesterday)
282341 [christian.ke] I uninstalled the ruby win32 gem and reinstalled it.

Ruby equivalent for `du`
282215 [cvonkleist@g] directory, because I didn't see anything in File::Stat or FileUtils
282218 [MonkeeSage@g] Couple problems with that approach 1.) assuming that ".", ".." are the
282226 [cvonkleist@g] Good point!  Something like %w(. ..).include?(file) would be better
282235 [MonkeeSage@g] No problem. :)

Fwd: Please Forward: Ruby Quiz Submission
282216 [james@gr yp ] ...

Keeping variables across requires?
282222 [peter.bunyan] I'm making a Befunge interpreter in Ruby - I like to keep my brain
282236 [m_goldberg@a] You really have two variables 'instructions', each local to file in
282238 [peter.bunyan] Ah, thanks. With Ruby I'm used to not having to do global/local things;
+ 282241 [dodecaphonic] ...
| 282244 [peter.bunyan] Ah, the program was that I didn't make all the other variables global as
+ 282245 [MonkeeSage@g] Global state is usually unnecessary. It looks like your code would fit

Re: infinite streams in ruby 1.9?
282225 [james@gr yp ] Continuations are available in Ruby 1.9 after requiring a standard
+ 282231 [mental@ry ia] A generator may also yield (no pun intended) better performance than
+ 282232 [MonkeeSage@g] Neat article, James! :)

Ruby globals
282230 [lschweyer@sy] I am have a moderate knowledge of Ruby and OO programming.
282240 [coder68@ya o] Research the GOF singleton pattern.. it is used extensively to solve the
283122 [shawn42@gm i] ...

[ANN] London Ruby User Group - 10th December 2007
282239 [murray.steel] ...

Tidy segfault on Linux
282246 [lee.fyock@gm] I'm using the Ruby tidy gem to clean some user-input HTML. It works
282454 [scott@id um ] Lee,
283592 [lee.fyock@gm] Excellent, thanks, I'll try it out.
308132 [robertfx@gm ] we ran into the excat same issue Lee described in

Re: ruby-1.8.6-p111 build on osx 10.5.0 fails; ok on 10.4.10
282251 [rogerpack200] to install mysql gem on ppc leopard (10.5)
282274 [laurent.sans] Laurent
282293 [rogerpack200] Yes that link helps you when you don't have xcode installed (which is,

WIN32OLE Date Conversion
282259 [mike.rood@in] I'm using WIN32OLE calls to grab data from Microsoft's Active

[ANN]  December Phoenix Ruby User Group Meeting
282260 [james.britt@] December Phoenix Ruby User Group Meeting

require "snmp" error in script
282262 [contact@th r] I am trying to require "snmp" in a basic script to poll some networking
282273 [klodus@gm il] add line
346175 [joseph.w.mar] I have tried installing and requiring rubygems in my SNMP script...
346181 [joseph.w.mar] Duh, it's because I didn't run the setup.rb script in the snmp gem

Lambda funcs that call gets won't halt program execution?
282265 [peter.bunyan] Once again, a problem with my Befunge interpreter. I'm trying to
+ 282270 [tpo2@so rc p] i= {}
| 282308 [m_goldberg@a] And this very similar code works just fine for me.
+ 282334 [w_a_x_man@ya] If Ruby is invoked in this fashion

Are there module existing for system test
282275 [tammo@ta mo ] I have looked around a little at rubyforge and RAA.

Worth an RCR? static_type_check, polymorphic_type_check,  quacks_like
282276 [john.carter@] Is there another library like this? I would love it if it were just
+ 282281 [MonkeeSage@g] Ola Bini released something similar last year [1]. It didn't go over
+ 282292 [transfire@gm] def initialize( _name, _drawable, _theme)
| 282298 [MonkeeSage@g] Heh. I used to think the opposite about respond_to?, but for a while
| 282336 [shortcutter@] Some more random thoughts about respond_to?
| 282451 [MonkeeSage@g] I can't think of an actual use case offhand (heh, that probably speaks
+ 282305 [john.carter@] Sure you can. However for more typing you get a lower quality / less
+ 282307 [no@sp m. le ] My Chattr gem does stuff like this for attributes and for arrays.
+ 282326 [dblack@ru yp] Keep in mind, though, that static type checking isn't just some safety
  282435 [john.carter@] Yes, yes, yes, I know all the theory, I've read the arguments....and
  + 282480 [no@sp m. le ] Clifford Heath.
  + 282517 [eeklund@gm i] by writing a "typesig" declaration before your method declaration (or

Capturing STDOUT from a system call (POSIX) into an array
282277 [venkatesh.ma] What's the best way to capture STDOUT into an Array? I looked at
+ 282279 [phrogz@ma .c] lines = `ls -l`.split( /\n/ )
| 282282 [venkatesh.ma] Thanks for your quick reply. I realize that you don't even need to use
| + 282288 [alexg@ku cr ] I'm not so sure about that last comment. As far as I know backticks
| | 282297 [venkatesh.ma] Thanks for your reply. It works now. I was looking for the method
| | 282301 [venkatesh.ma] Also, I tried collect! method earlier, but didn't know how to apply
| | 282362 [sepp2k@go gl] map and collect are the same. As are map! and collect!.
| + 282384 [kbloom@gm il] `cat /tmp/test.txt` will create a single string.
|   282397 [venkatesh.ma] Thanks.
|   282456 [MonkeeSage@g] You can always use shell redirection to redirect stderr to stdout...
+ 282284 [kbloom@gm il] You can use the IO objects returned by popen3 in any way that you'd use a
  282287 [venkatesh.ma] Actually, the output is not in a file. The output is generated by a
threads.html
top