240704-262938

240481-254556 subjects 240929-244217

Testing a query result
240704 [mahmoud.mhir] It's a very basic question, i want just to test if this query did return
+ 240707 [gavin@re in ] You will probably get better results asking this question on the Ruby
| + 240712 [mahmoud.mhir] that's true!
| + 240740 [stefan@ma li] I actually think that this is an ActiveRecord question. Does this
+ 240746 [palmerj3@gm ] ...

Using unpack on a UTF-8 string
240708 [greg.hurrell] ''.unpack('U*')
240732 [angus@qu va ] [Greg Hurrell <greg.hurrell@gmail.com>, 2007-02-24 20.00 CET]
240775 [greg.hurrell] Thanks a million, Carlos. I never would have figured that out for
240809 [no@sp m. le ] The problem here is the inconsistent use of character in the

Problem with session under cgi file.
240709 [dsa2@da ks y] When i set a value in session after changing page session doesn't
240714 [ara.t.howard] you need to make sure you flush and close it.
240718 [dsa2@da ks y] I've added sess.close at the end but it still doesn't work :/
240721 [ara.t.howard] are you setting the expiration?
240723 [jeremy@bi sw] ...
240729 [ara.t.howard] yeah i know - i had issues with this just last week though - i'll try to
240778 [dsa2@da ks y] So.. my friend have found what was wrong. It's all about session id.

00.01.class" error?
240717 [rubyrailssha] 0.1.class results in float.
240725 [gwtmp01@ma .] I think the problem is that floating point literals must be written

Just started learning Ruby
240728 [dracojk@gm i] ...
+ 240730 [cdcarter@gm ] Because the += operator actually reassigns the object, so you are
+ 240731 [stefano.croc] In both cases, writing second_var=first_var makes the two variables contain
+ 240760 [erikveen@gm ] gegroet,

[ANN] xx-2.1.0
240742 [ara.t.howard] NAME
240749 [jeremy@hi eg] Having a great Sat night eh Ara?
240750 [ara.t.howard] heh.  got a sick kid...

Ruby Load Path
240747 [bruparel@me ] I am trying to understand my Ruby Load Path settings.  I am on Fedora
240872 [bruparel@me ] Looks like no one found this one of interest! :(
240898 [renard@nc rr] Look in the Programming Ruby book.

Ruby subprocess
240751 [badcherry@ma] I am wanting inside of a ruby script to execute another ruby script in
+ 240752 [ara.t.howard] require 'rbconfig'
| 240772 [badcherry@ma] This will work for now, but didn't test it on windows yet.  Thanks,
+ 240765 [shortcutter@] child_pid = fork do

No Rails, shared host - what would you use for DB and Sessions?
240754 [twu@or .f ee] I am starting a new type of community site app. Humble beginnings: No

installation problem uconv-0.4.12. plz help
240756 [rising_sun_r] I need to install Unicode Conversion Module for Ruby version 0.4.12 by
240757 [jpywtora@ca ] Sounds like you are on a non-unix platform?  If Windows and no one has made a binary package available you might try the cygwin route where make, etc is available.
240759 [tuhin_cse99@] But the problem is how can i do it in windows? Actually i am not

Including a config file into a local directory
240758 [eddieroger@g] I'm working on a library for accessing MediaWiki wikies through its

mostly used version.
240761 [ashok.webdev] ...
240766 [phillipsds@y] ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] - home
240767 [sepp2k@go gl] By executing "ruby --version" in the terminal.
240768 [codeblogger@] ...
240769 [asbradbury@t] The problem is that the people participating in tattle or completely

Re: No Rails, shared host - what would you use for DB and Se
240762 [chris.lowis@] If you're looking to write your own software to do this, you might find
240829 [twu@or .f ee] Thanks for the lead Chris and Giles, I immediately got Chris's advice, and

[ANN] Ferret 0.11.0-rc1
240763 [dbalmain.ml@] Hey folks,

Hex to 4-byte/32-bit quantity
240764 [mattias@on o] I'm parsing a binary file and it contains (reading the specs on the
+ 240770 [mattias@on o] s.unpack("N")
+ 240797 [vjoel@pa h. ] vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
| 240808 [mattias@on o] Found that link in a previous post here also. I just wanted to get the
+ 240802 [B.Candler@po] irb(main):001:0> s = "\x00\x00\x00\x0a"
  240803 [mattias@on o] Yes - this was what I ment.

extract a random number of items from an array
240779 [josselin@wa ] given an array of values, how should I extract an random number of these values
+ 240782 [james@gr yp ] => [13, 15, 23, 24, 25, 26, 27, 28, 29, 31, 41, 42, 44, 45, 46, 47,
| + 240784 [chen.mingqua] ...
| + 240786 [josselin@wa ] thanks James that's exactly what I need
|   + 240787 [james@gr yp ] Exactly.  Using rand(10) you would have a 1 in 10 chance that each
|   + 240789 [chen.mingqua] ...
|     240864 [robert.dober] ...
|     240865 [robert.dober] an_ary.sort_by{ rand }[0..n-1]  # Might use a second or two of CPU for
|     240930 [robert.dober] This seems a mess, I'lll try again
+ 240804 [B.Candler@po] Are you trying to do pick 'n' elements from 'a' like lottery balls? i.e.
  240810 [josselin@wa ] no, I need to put all the balls again for the next pick
  240811 [B.Candler@po] Option 1: After picking one ball, you put that one ball back, then pick
  240839 [jzakiya@ma l] But for n > a.size Option 1 fills result with valid values while for

recommened package versions for linux
240780 [ashok.webdev] ...

How to run ruby in jEdit?
240781 [chen.mingqua] ...
240816 [jeroen@li ht] ruby test.rb

Class method declarations help
240783 [eckie2399@gm] Hope everyone is having a great weekend!  I was looking over some code
+ 240793 [cdcarter@gm ] Generally speaking, if you only have 1 or 2 class methods you use the
| 241032 [jon.budardan] OK, Chris -- I'll bite:  why the preference for 1 or 2 class methods
| 241033 [mental@ry ia] This has come to be my own preference as well, due to the POLT (Principle of Least Typing) :)
| 241057 [gavin@re in ] Although I see your smiley, let's analyze this.
+ 241056 [gavin@re in ] I personally prefer the former, as I think any sane person would.
  241063 [robert.dober] Mainstream, mainstream, ...

I need to know if one function does excist.
240785 [nitrohelgso@] Hey all!
240818 [robert.dober] ...
240848 [nitrohelgso@] This is a highland program or something, I want to know if I can use
+ 240853 [martindemell] There's the ruby/ncurses module which ships with ruby. require
+ 240934 [robert.dober] This problem is not a trivial one, I fail to know if Highline is a

Writing a "String#jindex" method to do the same for "index" as "String#jlength" does for "length"
240788 [greg.hurrell] So I've been using the 'jcode' library to get UTF-8 support and wanted
240863 [greg.hurrell] For the record, I decided to bite the bullet and try writing my first

Type of class
240790 [joaomiguel.p] How do I know if a variable is an instace of a given class
240795 [stefano.croc] The is_a? method tells whether the receiver is an instance of the class passed
240820 [joaomiguel.p] Thanks Stefano,
240831 [no.spam@pl a] and kind_of?, and (Array === a)... check them all out

ruby installation error: dependences failed.help me
240791 [andy@ya oo c] guys,

Ruport, Table append, access to record
240792 [donn@cm cm .] I'm looping through an Excel spreadsheeet, acquiring cells, and adding
+ 240796 [donn@cm cm .] I've attempted the following, but it is not buying it.  I get a tassoc
+ 240799 [gregory.t.br] r = @tbl_PAS[-1]
  240821 [donn@cm cm .] Thanks.  Sometimes "too easy" makes one feel really dumb.  I'm trying
  240823 [james@gr yp ] You might really want to consider taking Greg's advice then and

Blocks in class_eval
240794 [kyle.mitchel] ///// BEGIN funcmeta.rb /////
+ 240798 [ara.t.howard] class Module
+ 240800 [vjoel@pa h. ] def func_meta(&b)

More help with eruby
240807 [ruby@iw bs .] I really hate to ask for help and it seems that the simplest things are

RUBY + QT
240813 [flaab_mrlinu] Do you know if i can develop apps with QT Gui Interface?
240814 [pgquiles@el ] (some interesting discussions in the forums in Korundum's site).

writing 'plugins'
240815 [r.fulton@au ] I have a Ruby application that I am trying to extend by developing a
240819 [r.fulton@au ] private method `test' called for Action::Email:Class
240846 [B.Candler@po] Show the full class definition, including the method definition of 'test'.

define an each iterator, etc.
240833 [guillaume.na] I would like to know if it's possible to define iterators like each for a
+ 240834 [jmettraux@op] 2007/2/26, Guillaume Nargeot
+ 240835 [dblack@wo bl] On 2/25/07, Guillaume Nargeot

Lovely ruby powered Search  - thanks guys for all the help
240836 [kryptonsuper] Accelarated and GZIP compressed

Methods and :parameters
240837 [pedro.delgal] I've a question about the :parameter notation.
+ 240841 [rajsahae@gm ] To have a method with optional variables, assign them to nil in the
+ 240842 [has.sox@gm i] ...
+ 240845 [nagai@ai ky ] For example,
| 240870 [pedro.delgal] Wow ... thats exactly what i was looking for :). Can you explain me
| 240875 [nagai@ai ky ] # Expect the unknown method as accessing to a property.
| 240905 [pedro.delgal] Perfect :). Thanks a lot.
+ 240883 [kbloom@gm il] def add_book (book )

symbol to true object
240847 [rubylearner@] ...
240857 [B.Candler@po] BOOL_MAP = { :true=>true, :false=>false }
240861 [hans.sjunnes] Or
240874 [logancapaldo] if eql?(:true)
240877 [hans.sjunnes] Ah oops, thank your for that :-)
240890 [gareth.adams] class Symbol
240910 [B.Candler@po] Why to_s?

installation problem on windows xp
240851 [ashok.webdev] ...
240867 [gethemant@gm] You have seen Rails Routing error, which has apparently nothing to do

postgres gem & hashes
240855 [jef.peeraer@] i am a real postgresql addict so i installed postgres gem ( which is
+ 241844 [lists@be tr ] Write your own patch. I really mean it; it's not so
| + 241848 [ara.t.howard] fortytwo :~ > cat a.rb
| + 241976 [ruby@j- av s] It's not difficult to write the patch, I have patches of my own that I
|   242032 [lists@be tr ] (Concerning the OP's request there is some code in `plruby'
|   242156 [ruby@j- av s] Bertram,
|   242183 [lists@be tr ] Dave's answer is from March 1st, 2006.
+ 242174 [ciconia@gm i] Hey Jef

Ruby Weekly News 19th - 25th February 2007
240856 [timsuth@ih g] Links are at http://www.rubyweeklynews.org/20070225.html.

fastthread installation fails - debian - w or w/o gem
240858 [paukul@go gl] Building native extensions.  This could take a while...
+ 240859 [B.Candler@po] For Debian/Ubuntu, you need to install the ruby1.8-dev package to get mkmf
| 240860 [paukul@go gl] works. thanks so much!
+ 240919 [mental@ry ia] You will need to install the ruby1.8-dev Debian package in order to be able to install gems with C extensions (like fastthread).

segmentation fault on long running script (linux)
240866 [v.konrad@ls ] i have a long running script which takes a lot netcdf files and
240886 [jan.svitok@g] I suppose that linux makes core dumps unless it is told not to do
240887 [B.Candler@po] Or the process is setuid, unless you enable dumping of setuid processes with
240889 [v.konrad@ls ] this settings is the "culprit" i think, (this is on debian sarge).

Win32 QtRuby (again)
240868 [alin.popa@gm] Sorry for this RE topic but I didn't managed to compile the QtRuby
241136 [harponet@gm ] I am waiting for an installer, too!

retry / redo question
240869 [Gilbert.Rebh] i have a ruby script that does for 1 - n  folders a
240882 [shortcutter@] If you want to use retry you need to do that in an rescue clause as the
240885 [Gilbert.Rebh] /*

Perl bridge module for RubyInline?
240871 [eweaver.spam] Nothing else seems to be known. But if it exists, even in broken form, I
+ 240949 [eweaver.spam] No, a module for RubyInline that allows you to call Perl libraries from
+ 240951 [djberg96@gm ] Dan

Parsing CSV
240873 [george.rafae] 2 columns of the given files. My problem is that i tried a lot of
+ 240876 [B.Candler@po] Well, posting your code might allow someone to help you spot what's wrong.
+ 240878 [stephane.eli] require 'FasterCSV'
  240880 [george.rafae] passvalues = []
  240906 [james@gr yp ] passvalues = Array.new
  + 240911 [james@gr yp ] The above destroys the field order.  If you need to keep the order,
  | 240912 [james@gr yp ] Sorry, I meant row order.
  + 240913 [james@gr yp ] break  # performance enhancement
    240914 [george.rafae] Thanks, James and the other guys i think i found the solution for my problem :-)

Subclassing Array
240888 [wmwilson01@g] I'm sure I'm just being an idiot here... my mind is a little foggy this
+ 240891 [coder68@ya o] El Gato,
| + 240892 [james@gr yp ] I have become a tea.
| | + 240893 [matt@te hn r] So what did you do to get yourself in such hot water?
| | + 240894 [coder68@ya o] Ouch!!! Apologies.. Not enough coffee this morning and guess what my
| | | 240895 [james@gr yp ] No worries.  Hal listed me as James Edward Gray III in the second
| | | 240904 [perrin@ap th] James Edward Gray II ++
| | + 240899 [why@ru y- an] Not just any tea.  A tea that speaks in the voice of Darth Vader.
| | | + 240928 [gavin@re in ] LOL
| | | + 240940 [botp@de mo t] # > >(documentation provided by James Earl Gray II)
| | + 240927 [robert.dober] Tea for II, very nice, watch out for Jean-Luc ;)
| + 240897 [wmwilson01@g] I'm not sure if I'm missing something, but it appears that calling map()
|   + 240900 [ara.t.howard] check out arrayfields - on rubyforge or
|   + 240901 [coder68@ya o] El Gato,
+ 240926 [B.Candler@po] It was a Moment of Enlightenment for me when I realised that all this stuff

[ANN] Ruby In Steel Personal Edition v 1.0
240896 [huw@DE TH SB] SapphireSteel Software today released version 1.0 of Ruby In Steel PE

Installing Ruby, Sqlite3, Sqlite3-Ruby on Cygwin
240902 [ruby_admirer] ...
+ 240918 [jameskilton@] ...
| 240948 [rogerpack200] I believe that the ruby for cygwin works...all right...however if you
| + 240953 [micathom@gm ] Cyg ruby works quite well here. Using the windows ruby in a cygwin
| | 240966 [ajalkane@gm ] Having just been in the situation of wanting to use SQLite3 with ruby
| | 240970 [ruby_admirer] ...
| | 240971 [ruby_admirer] ...
| + 240954 [ruby_admirer] ...
+ 248826 [reachme@ch r] I tried following the steps posted but I get the following error when I
  + 248827 [cmdjackryan@] This line is a good hint: You don't have the SQLite3 sources available
  | 248833 [reachme@ch r] Thanks for the reply Phillip. I don't understand why the sources aren't
  + 248842 [B.Candler@po] You don't have the Ruby header files available.
    248951 [reachme@ch r] Thanks Brian. I've obtained the Ruby source files from the Cygwin setup
    248959 [reachme@ch r] Finally managed to get it going using the precompiled Windows binaries
    249156 [reachme@ch r] I just wanted to follow this up for those Googling this same problem.
    249193 [chris.lowis@] I'm glad it worked for you !

Test::Unit: setup per TestCase class or per suite
240907 [michael@sc u] For a performance test I need to populate the database with a large
+ 240908 [farrel.lifso] You should be able to put the data you need initialised only once in
| 240915 [michael@sc u] I don't think so. When I have
+ 240909 [robert.dober] I always use constants for that kind of problems.
| 240917 [michael@sc u] You've lost me there. I don't understand how this is supposed to work,
| 240925 [robert.dober] I was trying to impress the girls ;)
+ 240923 [B.Candler@po] 1. Use a class variable - or even a global variable - to record when the

bug in OpenURI#redirectable?
240916 [christopher.] Use open-uri to go to http://www.gmail.com

ED for Windows IDE released with comprehensive Ruby support
240922 [subs@su fu a] Folks here on the forum have been very helpful this past month with
240935 [ssmoot@gm il] It looks pretty nice, congrats!

soap4r attributes vs elements
240924 [roy.britten@] soap4r is great when it comes to creating requests consisting of elements
254555 [nakahiro@sa ] Sorry for the late response.
262938 [roy.britten@] Many thanks. That'll make life easier.
threads.html
top