347886-348576

347701-378690 subjects 348101-372005

[ANN] unicorn 0.93.2 - more compatible with Rails
347886 [normalperson] Unicorn is a HTTP server for Rack applications designed to take

lunix split with ruby
347887 [ahmedkilic@g] I am using cygwin on windows.
347898 [brabuhr@gm i] What (incorrect) output does your current script produce?
347901 [ahmedkilic@g] the output is only
347903 [brabuhr@gm i] that should change the output file names from "x" + "#{counter}" to
347907 [ahmedkilic@g] thank you for quick reply. I cold not understand  counter. Where is it
347911 [brabuhr@gm i] Sorry, yes that was unclear; it was just representing the "aa".."az"
347949 [ahmedkilic@g] sorry for late reply.
347952 [reid.thompso] use
347959 [ahmedkilic@g] thank you very much.

[ANN/ADV] THE COMPLEAT RUBYIST: training with Black/Brown/McAnally, FL, Jan 2010
347891 [dblack@ru yp] * The Well-Grounded Rubyist
347892 [dblack@ru yp] David

Ruby web programming
347893 [javaonly@ho ] I am asking for , how I can call Ruby from html
+ 347894 [commel@gm il] ...
+ 347915 [bbxx789_05ss] Yes.  You can use ruby's cgi abilities.
| 347929 [thiagown@gm ] <http://coolnamehere.com/geekery/ruby/web/cgi.html>Check it out, its good!
| 347945 [ehsanul_g3@h] ...
| 347950 [thiagown@gm ] Well, rails productivity is really good. Sinatra looks good if you want to
+ 347962 [rubfor@re it] You can't call Ruby from a web page. You have to use something like

Ruby Marshal unexpected results
347896 [aaron@ve h. ] For a Rails project, I'm trying to serialize some data in a hash, using
+ 347919 [bbxx789_05ss] require 'rubygems'
| 347920 [aaron@ve h. ] [ perfectly-functional code demonstrating Marshal and SQLite3 at work]
| 347921 [wishdev@gm i] Aaron,
| 347922 [aaron@ve h. ] That was a good suggestion! It pushed me further along, that's for sure.
+ 347930 [ryand-ruby@z] 1) this is a rails question, not a ruby question. You'd be better off

Wx::Choice Items generated from lookup table, later need id's of choices.
347900 [anthony.metc] I'm using ActiveRecord for db access.....
347905 [tom@th ry .o] Caveat emptor... I don't know WxRuby at all. However, the
347908 [anthony.metc] ntrolWithItems_append)

Re: unicorn 0.93.2 - more compatible with Rails
347913 [djberg96@gm ] Regards,
347941 [normalperson] Yup, it is excellent :)
347974 [djberg96@gm ] hould

Safe command line execution
347923 [zundra.danie] command line.  However, the problem I'm running into is this particular
+ 347924 [glennj@nc .c] Call system with more than one argument, and you don't get the shell
+ 347925 [h.bekel@go g] Just avoid any shell expansion. This can be done by passing the
+ 347943 [ninja@sl ph ] system '/usr/bin/cmd', '-username', username, '-password', password
+ 347968 [lists@be tr ] It has already been said that this is very dangerous. Please check
  348000 [zundra.danie] Thanks all for the input.  Unfortunately there is no other way to execute

Detect any "<a href=mailto:...>...</a>" string in a string?
347931 [forum@jo h. ] I have a long, long string of HTML tags. There might be some unprotected
347933 [gdonald@gm i] $GLOBALS[ 'EMAIL_LINK_REGEX' ] = "#<a[^>]*mailto:([^'\" ]*)['\"
347967 [danopia@ve i] You could also use a library such as hpricot or nokogiri to search and
348127 [forum@jo h. ] Thank you guys. Nokogiri looks really useful, I will take a look at it.

split question
347934 [chen_li3@ya ] I try to split a line that is separated by 'tab' and expect return an
+ 347935 [ryand-ruby@z] These aren't tabs. They're "\" followed by "t", you can tell because
| 347937 [chen_li3@ya ] Here is what I get using double quotes. I get an empty array only.
| 347938 [s.korteling@] str.split takes two parameters: the pattern and optionally the "limit"
| 347939 [dblack@ru yp] ["", "", "", "", ""] I think :-)
+ 347936 [josh.cheek@g] Single quotes treat things literally, like you can't interpolate, and \t is

Re: Detect any "<a href=mailto:...>...</a>" string in a stri
347960 [bbxx789_05ss] 1)regexes
347961 [bbxx789_05ss] By the way, you can't substitute js functions for <a> tags.

Poll on Eval in Ruby.
347970 [email@fa se ] I am Lisp programmer and I write an article on
+ 348034 [ninja@sl ph ] There wasn't an option for "Absolutely essential for the one time out of a
| 348035 [email@fa se ] It has, David. I think it is, lets say,
| 348040 [ninja@sl ph ] Well, except that I'm not making any statement about how people use it,
+ 348070 [minilith@gm ] Are we talking about
| 348083 [jgabrielygal] I thought we were talking about all eval version (eval, instance_eval,
| 348088 [dblack@ru yp] ...
| 348089 [james@gr ys ] I'm just not sure eval()ing a String or regular ole eval() are *alway* =20=
| 348097 [dblack@ru yp] ...
+ 348328 [email@fa se ] THE RESULTS OF THE POLLS

Looking hosting donation for project.
347972 [contacto@fr ] t it.

state of actor model?
347975 [diego.viraso] I've read in the past about several projects to support the actor
+ 347980 [smparkes@sm ] Most of them have been pretty dormant, I'd say. That said, I expect a
+ 347982 [tony@me io .] Tony Arcieri

Upcoming RubyConf
347976 [rubyhacker@g] If anyone has to back out, please consider selling me your spot.

regettext is not enough fix in ruby nomenclature
347977 [ruby@ay i. o] [svn@mylapi ~/work/abc/ruby/cgi]$ rgettext *.rb -o rmyappl2.po

Mixing instance_eval and block with arguments
347981 [shortcutter@] S = Struct.new :foo, :bar
+ 347985 [jgabrielygal] Probably not exactly what you want (can't make self to not be main
| 347995 [shortcutter@] Thank you!  Unfortunately I tried to avoid explicit passing of the=20
+ 347990 [tony@me io .] Sounds like you need instance_exec, which is a 1.9 feature but there are
  347996 [shortcutter@] 1.9 is OK.

Documenting DSLs
347983 [transfire@gm] Has anyone done any work on documenting Ruby DSLs? Eg. RDoc can
+ 347988 [ryand-ruby@z] Seems you're not in "transition" anymore.
+ 348023 [rogerpack200] I had to ask the same question recently.
+ 348033 [flo@an er gr] YARD can be pretty easily made to parse such stuff.
  348076 [sunaku@gm il] I think you meant to say ERBook[1] (which generates beautiful user

ZipFile.extract overwrite option
347984 [ iggy@po .m ] I'm trying to extract a Zipfile using the ZipFile Class.
347987 [tom@th ry .o] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
348021 [ iggy@po .m ] works like a charm!

Difficulty updating Ruby Gems in a non-standard location
347986 [brodbd@u. as] I have Ruby Gems installed in a non-standard location.  Both
347989 [aaron@te de ] I would suggest downloading the tar.gz and running setup.rb (making
347998 [brodbd@u. as] Unfortunately, that failed in the same way "gem update --system" did
348002 [spox@mo sp x] Using the source you downloaded, make sure that GEM_HOME is exported, then run
348005 [brodbd@u. as] $ gem
348049 [brodbd@u. as] I finally figured it out.  I had two copies under ruby-gems, a new one

write a file
347991 [chen_li3@ya ] I use the following script to write a 2D array. I wonder if there is
+ 347993 [rodrigo.berm] What you have is good enough.
| 348004 [chen_li3@ya ] Unfortunately Excel doesn't see the formatted outputs correctly, so I
+ 348011 [botpena@gm i] you may want to look at fastercsv.
+ 348022 [danopia@ve i] "}
+ 348032 [chen_li3@ya ] Thank you very much for the code. But I still like to do the format

find a print out a line
347992 [collin.moore] I am slowly learning Ruby and working on a solution.  I have huge text
+ 347994 [rodrigo.berm] is there a famous one-liner for this ..but its not good for a learning
+ 347997 [shortcutter@] If you only need to extract those lines the most efficient solution is
| + 348001 [collin.moore] how would i write the output to a text file?  I tried the following, but
| | + 348003 [paul@po ly n] For simple ruby scripts I usually have the output go to screen, then
| | + 348201 [bbxx789_05ss] fout = File.open("data2.txt", "w")
| + 348162 [lists@be tr ] ruby -pe '~/TestPhase/ or next' $yourfile
+ 348014 [reid.thompso] $ grep TestPhase *hugefilesglob* > outputFile.txt
+ 348024 [ruedi@br hn ] To reduce the array File.readlines returns to only the lines that
  348149 [kbloom@gm il] If you don't want to store the whole file in memory while you're grepping

Green Threads - I want them to thrash...
348006 [mattbrooks@g] All Day I have tried to accomplish the following using threads, and just
+ 348017 [jgabrielygal] $ cat threads.rb
| 348019 [karottenreib] a = Thread.new do
+ 348031 [shortcutter@] You did not mention the version you are using, so I assume it was
  348043 [mattbrooks@g] I appreciate all the help, and it finally worked.  i was using 1.8...
  348079 [shortcutter@] That was intended to make it a bit more realistic for the case of using

String of Parameters used as parameter list
348009 [jemburula@ho] I know this might sound unorthodox but I am storing a function and
348010 [botpena@gm i] 1 then you may need to adjust the calling, eg
+ 348013 [jemburula@ho] Great, thanks botp. I figured out the * syntax about 10 minutes ago =)
+ 348026 [ruedi@br hn ] The function_args were two Fixnums and one String, after this you have

[ANN] ERBook 7.2.0
348012 [sunaku@gm il] ERBook 7.2.0

[ANN] Dfect 1.0.1
348015 [sunaku@gm il] Dfect 1.0.1

Running BackgroundRB on Cygwin + Windows?
348016 [g.h.vandoorn] I got BackgroundRB to start under cygwin (currently using the version

Making one reg ex out of two
348025 [jack.zelig@g] course_info =
+ 348027 [phrogz@ma .c] Slim2:~ phrogz$ irb
| 348029 [jack.zelig@g] Thanks very much for that.
| 348030 [lists@be tr ] course_info =~ %r{<title>(.+?)</title>}
+ 348206 [mark@th ma z] This looks like an XML string. Did course_info come from an XML
| + 348250 [jack.zelig@g] That's a good idea. Thanks, I'll look into that.
| + 348254 [jack.zelig@g] Just installed and followed a quick tutorial on Hpricot.
+ 348252 [a.bovanenko@] text="<course><date>10.10.09<date><title>Maths</title></course>"

better looking directory chooser for tk?
348028 [rogerpack200] Currently in windows with Tk
348050 [nagai@ai ky ] Please see the section "Standard Dialogs" on
348112 [rogerpack200] Excellent.  I will look into the pure tk one.

Array#accept
348036 [rogerpack200] Since there's an Array#reject, shouldn't there be an Array#accept?
+ 348037 [bbxx789_05ss] It's called Array#select.
+ 348039 [yermej@gm il] Maybe, but there's Array#select instead.

Building an Excel spread sheet on UNIX and displaying it in WIndows
348038 [ruby.student] I have a flat, text file of size (row,col) where row > 50 and col > 10.
348047 [martindemell] there was a thread about this just recently, check the archives

File.addmod?
348041 [rogerpack200] I'm familiar with
+ 348044 [Rob@Ag le on] File.class_eval do
| 348048 [rogerpack200] Much thanks.
+ 348075 [sunaku@gm il] I filed a feature request for symbolic mode ('u+r') support
  348111 [rogerpack200] Thanks for doing that.

Windows Ruby Version Check
348042 [james@gr ys ] Can a Windows Ruby user please confirm that the "Ruby 1.9.1-p129
+ 348045 [damnbigman@g] ruby -v
+ 348046 [xenogenesis@] =A0
+ 348052 [aaron@te de ] Time to log in!  Hrm, what's this?
| + 348054 [Rob@Ag le on] This was a wonderful way to end a very long day.
| | 348056 [dreamcat4@gm] VirtualBox, that works.
| + 348485 [headius@he d] * Install JVM (if it hasn't been installed already)
|   348488 [aaron@te de ] You don't have to set up your environment to point at the JVM?  How hard
|   + 348571 [headius@he d] Of course we're talking past your point now (my fault, I didn't get
|   + 348576 [gthiesfeld@g] e many
+ 348060 [luislavena@g] On Oct 9, 10:01=A0pm, James Edward Gray II <ja...@graysoftinc.com>

Basic RSpec Error, 'no such file to load'. Help
348051 [prasanna.per] I am new to working with RSpec

[ANN] unicorn 0.93.3 - OpenBSD compatibility
348053 [normalperson] Unicorn is a HTTP server for Rack applications designed to only serve

Array help
348055 [nwade1@gm il] I am a brand spankin' new wannabe ruby programmer.  The attached is my
+ 348062 [damnbigman@g] I haven't looked at your code so probably shouldn't be answering this but..=
+ 348063 [florian.assm] 1st of all, in Ruby you do not need to declare or define each of your

How to control application on Windows
348059 [zachary.h.wo] I have an application running on Windows XP.
+ 348067 [devguy.ca@gm] You could try looking on http://rubyforge.org/
+ 348073 [dylan.mcclun] I haven't read this book, but I would bet it could answer this and other
+ 348081 [sutniuq@gm .] That's funny - a few minutes ago I released a new version of au3;

Scope of constants in instance_eval
348061 [peterk@li in] so If I do<br>
348065 [flo@an er gr] This is a bit of a strange problem. Ruby 1.8 resolves constants =20
348084 [peterk@li in] Thanks - actually it does answer the question, but it also answers that
348085 [xenogenesis@] well in Ruby 1.8 something like this works (obviously not it all
+ 348105 [peterk@li in] I got 1.9 and am now running it :)
+ 348133 [peterk@li in] That there are convenient installers/packages/etc available and
+ 348256 [b.candler@po] Or more simply, self.class::CONST

[ANN] Ruby Challenge for Beginners #2
348064 [satish.talim] The second installment of the Ruby Programming Challenge for Newbies
348114 [badlands_200] ...
348115 [thiagown@gm ] I'm in and ive sent my solution, i really enjoyed this 1 and i hope i win :D

Numbers game - multiple guesses?
348066 [thefiend@ma ] I'm trying to figure out how to get a user to be able to submit guesses
+ 348068 [kimhyunkang@] you can do this by making an infinite loop and break from the loop when the
+ 348069 [dylan.mcclun] Use a control loop such as while(!correct) that wraps your guessing
| 348071 [thefiend@ma ] Great!  Thanks!
+ 348072 [devguy.ca@gm] There seem to be a slight bug in the if clause, what happens if the number is 5?
+ 348087 [miguelregedo] number = 5 + rand(65)
| 348129 [dblack@ru yp] number = 5 + rand(65)
| 348167 [miguelregedo] I like the diff hash :p clever!
| 348267 [b.candler@po] diff = {
+ 348120 [greg5000@ea ] I'd do.

[ANN] ERBook 7.3.0
348074 [sunaku@gm il] ERBook 7.3.0

Need help invoking debug
348078 [sleette@gm i] Newbie here.. I'm trying to run a ruby program in debug mode.  I used
+ 348110 [rick.denatal] Did you try looking at what's inside ubygems.rb
+ 348113 [rogerpack200] What's happening is probably that you have RUBYOPT=-rubygems
  348116 [sleette@gm i] Thanks for the advice guys.. RP I did what you suggested and it seemed

[ANN] au3-0.1.0 released
348080 [sutniuq@gm .] A new version of the au3 gem, which is part of the Automations

for loop in excel macro
348082 [chen_li3@ya ] Here is an off -Ruby topic. Recently I need to do a lot of work in Excel
348095 [rodrigo.berm] You can perform this task using Ruby.
348119 [chen_li3@ya ] Thanks for the link.  I might refer it if I use a lot of Excel

Couldn't find 'rspec' generator
348086 [prasanna.per] I want to add RSpec as a rails plugin to a new rails project.  I am

a lot of free ebook download here
348090 [davy.day007@] ...

Can't use variable from cgi with hpricot
348091 [wileydavis@g] I'm trying to get a url from a form and return the page title of said
+ 348121 [greg5000@ea ] lib, however, so here's my take.
| 348135 [wileydavis@g] Just to be sure, I checked the form and it looks okay.
| 348155 [bbxx789_05ss] What's the server error?
+ 348123 [bbxx789_05ss] A cursory examination of those strings reveals that they are not
  348134 [wileydavis@g] Thanks for pointing out the unescape, something I hadn't thought of.

Trouble with local variables
348092 [severin.news] I've been coding with Ruby for about three days, and I just ran into my
+ 348093 [rodrigo.berm] read about class variables (or global variables)
| 348098 [dblack@ru yp] @score is an instance variable, not a class or global variable. I
+ 348094 [lists@be tr ] def menu ary
+ 348096 [list.rb@gm i] #checker
+ 348099 [greg5000@ea ] Hey! Making a quiz is not something I have ever done, but after reading
+ 348263 [b.candler@po] I think you'd find it helpful if you post the actual error you get when

Class Level inheritable attributes - are we there yet?
348100 [dreamcat4@gm] I'm having trouble understanding why this isn't available from the Ruby core?
+ 348103 [dblack@ru yp] module ClassLevelInheritableAttributes
| 348104 [dreamcat4@gm] The problem with class variables in Ruby, is that a class variable is
| + 348106 [dreamcat4@gm] Ah,
| + 348107 [dblack@ru yp] ...
| | 348109 [dreamcat4@gm] No, its just a generally accepted problem with the ruby language.
| + 348136 [shortcutter@] ant
|   348137 [dreamcat4@gm] It shouldn't be mandated to re-invent the wheel in any programming
|   + 348139 [dblack@ru yp] ...
|   | 348191 [gregory.t.br] Here's my vote for making @@ a syntax error. :)
|   | 348217 [shortcutter@] +1!
|   + 348144 [rick.denatal] attribute accessors don't cause instance variables to exist until the
|   + 348159 [shortcutter@] ct
|   | 348168 [dreamcat4@gm] Ah,
|   | 348177 [dreamcat4@gm] - @inheritable_attributes.each do |attr|
|   + 348234 [transfire@gm] Closer to what you want?
+ 348150 [transfire@gm] ore?
+ 348200 [ara.t.howard] you certainly aren't complaining and i must say that i'm a little
  + 348216 [gwtmp01@ma .] I was going to post a pointer to fattr but now I don't have to.
  + 348231 [dblack@ru yp] I'm puzzled by the divisive tone of this. I think we're all on the
    348248 [ara.t.howard] ??
    + 348258 [shortcutter@] Ara, I don't agree to everything you write above especially since - as
    | + 348264 [dreamcat4@gm] Before answering to Roberts specific questions, as the OP i'd like to
    | | + 348265 [tom@th ry .o] Isn't this covered by the below? Not sure how class level attributes
    | | | 348272 [dreamcat4@gm] Writing the analogy out in Ruby isn't much help here. The construct you
    | | | 348274 [shortcutter@] Erm, aren't you mixing class and instance state here?  If you have a
    | | + 348273 [shortcutter@] This is a classical case I would resolve with instance methods that
    | |   348277 [dreamcat4@gm] Yes. I have been using this way for the YamlDoc Gem
    | |   348278 [shortcutter@] Well, it _is_ in the language already.
    | |   348289 [nathan@my bi] class A
    | + 348375 [ara.t.howard] sorry i missed your post.  i think my guidelines are probably
    |   348402 [shortcutter@] Thanks for the pointers!  Now that looks quite specific.  It seems
    |   348442 [ara.t.howard] it is.  of course evolved.  main evolutions involve
    + 348266 [dblack@ru yp] I was responding to your comments about this being re-invented
threads.html
top