261611-264140
261365-262991 subjects 261788-262438
^ ActiveRecord Problem
261611 [ari aribrown] Ugh. ActiveRecord is giving me a hard time.
261612 [warlickt ope] It's saying that it can't find the MySQL socket. Check your connection
261615 [ari aribrown] Thanks. Do you know why Mac OS X doesn't have /tmp/mysql.sock?
+ 261622 [grzm seespot] Maybe your MySQL server isn't started? Can you connect to the MySQL
+ 261624 [ben bleythin] The socket location is configurable, and I think by default it puts it
261641 [dangerwillro] did you install on OS X using the MySQL OS X installer?
^ Newbie question
261614 [ed noreply.c] Under most languages it pays to use a StringBuffer of sorts.
+ 261616 [marcel verni] Strings are mutable in ruby so you just use the << method to append to a
| 261620 [ed noreply.c] Thanks, I will give that a go. My automatic knee-jerk reaction was to
+ 261618 [hhausman gma] Under most languages it pays to not do heinous things that cause the
261619 [ed noreply.c] Thanks very much, this looks like a very useful resource.
^ Re: Is there a replacement for sub?
261621 [renard nc.rr] You are absolutely correct!!! Your improvement does what you expect it
^ Preparing Data For Statistical Analysis and Reporting
261623 [irishhacker ] How much data munging is done by Ruby-ists?
261644 [znmeb cesmai] Thanks for the pointers! This is actually something I do a lot in my day
^ How do I build a tree of directories?
261628 [anilscuba ya] directories and sub-directories on the server. The XML will look
261653 [skye.shaw gm] You'd want to use one of the Dir methods; foreach(), glob()...
^ [ANN/PIMP] Ruby Certificate Program @ University of Washington This Fall
261629 [ryand-ruby z] There is a certificate course at the UW starting this fall. It is 3
+ 261642 [znmeb cesmai] Sounds fantastic!! How is this to be delivered? Electronically? Or must
| + 261643 [has.sox gmai] Indeed, is it available on the net? If it is is it available
| | 261646 [dangerwillro] Regardless, THIS along with the slew of Ruby (and Rails) books that
| + 261648 [ryand-ruby z] Sorry, but this is a classroom (only) based curriculum. I don't know
| 261755 [al_batuul ya] It would be great if it is possible to attend virtually=0A=0A=0A----- Origi=
+ 261813 [robert.dober] ++ breaking even already :)
^ rtrim and ltrim function for ruby: is this ok?
261630 [leon tim-onl] class String
+ 261636 [caduceass gm] I'm not sure this does what you want it to. The object referenced by
+ 261640 [nobu ruby-la] Perhaps. See String#rstrip and #lstrip.
+ 262013 [transfire gm] #chomp!
+ 262016 [robert.dober] Well there is, it is just sooo expensive ;)
+ 262516 [leon tim-onl] Thanks! To bad for the missing left-chomp
^ FaerieMUD? (was Re: Problems with test cases and other things with Ruby-WordNet)
261647 [znmeb cesmai] Ah ... so MUES and FaerieMUD are alive and well? I stumbled across some
261650 [ged FaerieMU] They are. I don't get as much time to work on them as I'd like, but
^ Newbie question, writing to a file
261652 [dontspamme s] I'm reading Learn To Program, which is based around Ruby code, and it
+ 261656 [raasdnil gma] Good on you for learning Jenny :)
| 261661 [dontspamme s] I am trying, thanks for the encouragement!
+ 261658 [caduceass gm] Here's one way to do it...
^ Refinement to facets/more/snapshot.rb
261654 [rubylearner ] Suggestion for facets library snapshot.rb
261657 [transfire gm] Good idea.
^ Is there a way to move gems from 1.8.4 to 1.8.6?
261655 [weyus att.ne] I am currently on Ruby 1.8.4 on Windows XP.
261659 [warlickt ope] In my upgrades, I upgrade Ruby, then run
+ 261660 [james.britt ] Are you sure? I haven't installed on windows in a while, but last I
| 261663 [warlickt ope] I didn't use the 1-click installer, I just downloaded the Binary version and
+ 261846 [weyus att.ne] Under Windows, the gems are not separate from the Ruby installation,
261957 [phurley gmai] Wes, don't forget that some gems install a binary component which if
^ command queue structure help?
261662 [kmouse gmail] Greetings. I have been studying Ruby, have the pickaxe and Ruby Way
261738 [webs.dev gma] # you could do this
^ command queue structure help?
261664 [kmouse gmail] Greetings. I have been studying Ruby, have the pickaxe and Ruby Way
^ Help: Get list of modules which are included in the class
261667 [chirag80bece] I want to get a list of modules which are included directly in the class
+ 261669 [robert.dober] Maybe my friend irb can help ;)
| 261674 [FireAphis gm] I don't think that it answers the question. Look at the following
| + 261678 [fred lacave.] #! /usr/local/bin/ruby
| + 261682 [robert.dober] What!!! Do I have to read the post in oder to answer now???
| 261685 [botp delmont] # > I think that Chirag wanted to get only M2 and as you can
| 261723 [fred lacave.] Just Fred is all right, y'know... :)
+ 261670 [botp delmont] # only want a list which contains modules M1 and M2 for MyClass. If we
| 261672 [robert.dober] not stupid at all, you just overlooked a little detail, parent classes.
| 261676 [botp delmont] # p C2.ancestors - (Class.new.ancestors + [C2])
| + 261679 [dohzya gmail] How about (C2.ancestors - [C2] - C2.superclass.ancestors) ?
| | 261683 [robert.dober] You got it, indeed it was not so chellanging after all :(
| | 261688 [dohzya gmail] module M1 ; end
| | + 261691 [robert.dober] We have to ask OP, if he really wants to have M1 in this list I am
| | | 261718 [dohzya gmail] You're right, but it can be fixed :)
| | | 261727 [robert.dober] no it cannot :(, look at C4 below
| | | 261733 [dohzya gmail] This was the first and not fixable (with this solution) problem :)
| | | 261766 [robert.dober] yeah the information just is not in the ancestor array :(
| | + 261701 [FireAphis gm] There is another problem. If C2 doesn't inherit another class but does
| + 261680 [botp delmont] # From: Robert Dober [mailto:robert.dober@gmail.com]
+ 262714 [wayneeseguin] charset=US-ASCII;
262816 [dohzya gmail] There is a problem (him ! again ! Arrrrrrg (Monthy Python dixit (yeah
+ 262834 [wayneeseguin] charset=US-ASCII;
+ 262838 [wayneeseguin] charset=ISO-8859-1;
262842 [dohzya gmail] Thanks :$
^ utf-16 little endian byte order mark with libxml-ruby
261684 [freestyle_ka] Hey all
261717 [freestyle_ka] It appears that the save() method on XML::Document will create files if
^ Formatting text.
261686 [m.tyman inte] Is there any way to format a string. I.E. I've got a variable which may
+ 261687 [shortcutter ] Please look for printf, sprintf and % in the docs. The last one might
| 261690 [m.tyman inte] OK, Fine. But... I want to format the string not its output to redirect
| + 261692 [sepp2k googl] sprintf and % return a string, they don't print anything to the screen. You
| | 261722 [kaldrenon gm] On Jul 25, 5:54 am, Sebastian Hungerecker <sep...@googlemail.com>
| + 261693 [shortcutter ] Now what? Do you want to output or not? I do not understand your
| + 261695 [botp delmont] # OK, Fine. But... I want to format the string not its output
+ 261689 [botp delmont] # Is there any way to format a string. I.E. I've got a variable
^ YARV issues
261694 [abhijithg gm] I have downloaded the latest version of YARV and built it from source on
^ Help: Locomotive - error
261697 [tuaregue gma] In the browser I have this error, I'm a newbie.
^ Detecting singletons
261699 [lars.westerg] I have a fairly large and complex object graph of Value Objects created
+ 261702 [noodlet gmai] (first post to this list, so get some salt)
+ 261703 [shortcutter ] If Singleton === obj
| 261707 [robert.dober] require 'singleton'
| 261708 [robert.dober] Did I do something stupid?
| + 261709 [shortcutter ] No, you seem to be dragged into the confusion between singleton and
| | 261711 [shortcutter ] Sorry for the noise. I should have checked.
| + 261710 [lars.westerg] Oh, good, so it wasn't just me then.
| 261712 [robert.dober] well seems you have to use my code then, it depends on a "feature"
| 261729 [lars.westerg] Not sure.... Your code works good in irb and catches singletons
| 261767 [robert.dober] OMG Rails, what do they do my Ruby? ;)
+ 261705 [robert.dober] The following should do the trick -- alas :(
261706 [robert.dober] gsub( "Class", "Object")
^ File.basename problems
261714 [pbailey bna.] Why is it that File.basename works for me for one single file, but, it
+ 261715 [robert.dober] I could not reproduce the error, just after touching 1.tif and 2.tif I ran
| 261949 [pbailey bna.] Here I'm using Ruby 1.8.5 on Windows Server 2003.
+ 261716 [martindemell] Works for me - what ruby version and OS? Try
| 261953 [pbailey bna.] Both lines yield the same TIFF files. The second one shows the same TIFF
| 261962 [robert.dober] Seems it is time to upgrade to 1.8.6, although I am not sure at all
| 261968 [pbailey bna.] Thanks, Robert. I did upgrade to 1.8.6. But, using your suggestion here,
| + 261980 [robert.dober] That is a good thing anyway,
| | 262038 [nobu ruby-la] Try File.basename(tiffile, ".*")
| + 261985 [gthiesfeld g] => ["1_lower.tif", "1_upper.TIF", "2_lower.tif", "2_upper.TIF"]
| 262153 [pbailey bna.] Yes! Thank you all! I did a File.rename to downcase and now it works
+ 261721 [peter semant] OSX 10.4.10 : ruby 1.8.5 (2006-12-25 patchlevel 12) [powerpc-darwin]
261951 [pbailey bna.] I'm using Ruby 1.8.5 on Windows Server 2003.
^ Creating instance variables while looping over a hash
261719 [jangchub gma] I"m reading in a YAML file using the yaml library in Ruby. My YAML
261725 [dohzya gmail] You should play with Object#instance_variable_set(name, value)
261726 [dohzya gmail] # some representation of your data
261730 [jangchub gma] Your example really showed me, thank you so much Etienne. You have
^ [OT] licensing/copyright reading material (was: Ruby Editor)
261720 [caduceass gm] have listened with strain
+ 261724 [phelan tttec] A quick search with "open source economics" at Amazon gives
| 261731 [caduceass gm] Thanks, Brad. I'll check those out. I was sort of looking for
+ 261728 [aurelianocal] Google for "The cathedral and the bazar".
| 261732 [caduceass gm] Yes! Resources along this vein are what I am looking for.
| 261901 [minciue gmai] You might want to try "Producing Open Source Software" by Karl Fogel.
+ 261739 [ jupp gmx.de] If you want unbiased information you at least need three independent
261758 [caduceass gm] Basically, you're saying go out and read everything and make up my own
261886 [caduceass gm] Thanks, Chad. There's certainly a lot of food for thought here. I
^ requiring multiple files
261734 [terry.dellin] I was wonder how one goes about requireing multiple files.
+ 261736 [kyleaschmitt] run.rb is a directory higher than require_me.rb, so you're require line would be
+ 261737 [alex blackke] require 'sub/require_me'
+ 261769 [ccthiel gmai] To clarify on Alex's response, I think that this has something to do with
^ A question of style...
261742 [kyleaschmitt] I just had a funny thing happen.
+ 261744 [tanner.burso] It looks like your page* and cleanURL methods are in the same class as the
| 261748 [kyleaschmitt] Tanner,
+ 261749 [cardboard42 ] I think it's more standard to use String#dup rather than clone. If all
+ 261750 [cardboard42 ] On Jul 25, 11:38 am, "cardboar...@gmail.com" <cardboar...@gmail.com>
+ 261752 [kyleaschmitt] That's a good option. Would it make sense though? Having it in the
^ read variables from string
261743 [daniel.leuen] I would like to extract an array of e.g. integers or floats from a
+ 261746 [cardboard42 ] I don't really know how to use unpack, and I'm not positive it's
+ 261747 [list.push gm] It depends on your rules for extracting data.
261824 [daniel.leuen] Thanks for your input. But I was looking for something like an inverse
+ 261828 [dblack wobbl] irb(main):001:0> require 'scanf'
+ 261834 [TimHunter nc] RMagick OS X Installer [http://rubyforge.org/projects/rmagick/]
^ Efficiency/runtime trouble - may not be Ruby-specific
261751 [kaldrenon gm] Ruby issue, but I've written the program in Ruby and the community
+ 261776 [jan.svitok g] hcf(14,35) == 1 which is wrong.
| 261820 [kaldrenon gm] I try to do this in general, but am I correct in my thinking that it's
| + 261870 [m_goldberg a] That's very close to what I did. However, the conditional clause of
| + 261900 [jan.svitok g] In your script Math.sqrt was computed inside an each loop. Now it's
| 261964 [kaldrenon gm] In other words, if the exact same calculation is needed in more than
| 261965 [jan.svitok g] Right, but it depends on calculation's complexity. sometimes creating
+ 261791 [m_goldberg a] Jano Svitok has already given you a good answer, but let me add my 2
^ Interesting research for Ruby implementors
261753 [znmeb cesmai] "Data Layouts for Object-Oriented Programs".
261994 [gregory.t.br] You may wish to read the source of some of the top 50 or so downloaded
^ Detecting the end of a text file...
261756 [sketchitup g] I'm just beginning to learn the Ruby progamming language, although I
+ 261759 [fwmailinglis] charset="us-ascii"
+ 261760 [lparravi gma] As far as I know, all the IO methods return nil on EOF except for
261774 [sketchitup g] Thanks for the responses Luis. I think I need to read a little more
^ Strange error installing RubyGems
261761 [vasudevram g] I'm on Windows 2000 with Service Pack 4.
^ Ruby error - cannot find ruby gem active record
261763 [jmilunsky ho] I get the following error message
261765 [caduceass gm] Todd
261768 [jmilunsky ho] Thanks for the quick response
261810 [caduceass gm] I am not sure about your set up. Are you saying the command "gem
261878 [jmilunsky ho] Things seem to have gotten worse for me. I had it working at one point
261880 [caduceass gm] No, this is a connection error. I can reproduce this by establishing
+ 261884 [jmilunsky ho] that could be it, i will check that right away, thanks
+ 261896 [jmilunsky ho] I got it to work eventually, couple problems but the main thing is
^ Question - Passing parameters by reference
261764 [caof2005 gma] How can I pass a reference to a method as an argument, so after
261770 [caduceass gm] Assignment inside method scope is allowed, but creates a different
+ 261771 [ccthiel gmai] to have to return the changed value? How do you pass in a variable to a
| 261775 [dblack wobbl] def change_me(str)
| + 261780 [ccthiel gmai] def add_one(number)
| | + 261782 [ccthiel gmai] I believe it's adding & in front of the argument in a method in C++ to get
| | | 261786 [lionel-subsc] Ruby always pass references. The problem is that "number += 1" is
| | | 261795 [ccthiel gmai] Sorry to derail the thread a bit there.
| | + 261785 [damnbigman g] n = add_one(n) would fix your given case. I assume it is more complicated
| + 261783 [ruby philip.] did you mean to say...
| | 261809 [dblack wobbl] No; I meant to say change_me(s) :-)
| + 261790 [caof2005 gma] Thanks for the response, although I was just wondering that using
| + 261797 [caduceass gm] Yes, because a Fixnum object is immutable. Also, like David said, you
| + 261798 [jameskilton ] String are of course instances of the String class. This is simply an array
| 261811 [okushi gmail] I think it's the clearest explanation so far Jason.
| 261812 [dblack wobbl] Or... you pass a reference by variable :-) I think it's useful to
| 263557 [gwtmp01 mac.] I go even farther and simply think of symbols and integers to also be
| 263559 [dblack rubyp] 1 # textual representation of that object
| + 263581 [logancapaldo] val = 1
| | 263720 [gwtmp01 mac.] It is confusing to me to even think about methods returning objects
| | 263723 [dblack rubyp] first, as a synonym for a literal constructor (the actual "ink on the
| | 263731 [gwtmp01 mac.] Perhaps that was just sloppiness on my part. I think of a 'reference'
| | 263734 [dblack rubyp] No, I really meant to lump all expressions together, pretty much. I
| | 263762 [gwtmp01 mac.] <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/20236>.
| | + 263784 [dblack rubyp] I don't know -- in my case, I just always remember reading and
| | + 264140 [mlgaunnac gm] *snip*
| + 263722 [gwtmp01 mac.] In the way I think about things those examples are not the same.
+ 261784 [caof2005 gma] Although it did not change neither of both parameters and I suppose
^ ANN: assert_raise_message
261777 [phlip2005 gm] I don't like assert_raise because the first thing I wanted to check was the
261779 [james graypr] message = assert_raise ... do
^ Initialization after YAML load?
261778 [lfast mdsi.c] I'm saving and restoring a large tree structure using YAML. What I've
261789 [jan.svitok g] you can use #to_yaml_properties() - return everything except the ones
261876 [lfast mdsi.c] Thanks Jano,
^ opposite of [thing].flatten
261787 [phlip2005 gm] We all know this clever idiom to turn a variable that might be an Array into
+ 261792 [ruby philip.] This almost gets there...
+ 261799 [Rob AgileCon] irb(main):001:0> nil.to_a
+ 261807 [gregory.t.br] I think
| 261818 [phlip2005 gm] Ruby is a strongly-typed language that permits you to write interfaces that
| + 261827 [gregory.t.br] "We all know this clever idiom to turn a variable that might be an Array into
| + 261831 [dblack wobbl] There are certainly cases where the flattening is not accidental, but
+ 261815 [phlip2005 gm] Ouch. I should'a knowed that!!! Wow. Ouch!
threads.html
top