271789-390602 subjects 272313-280730

ruby-odbc giving memory access error
271999 [deanholdren@] I'm using ruby-odbc on a macbook pro, trying to connect to an Oracle

Binary data, command output, and Ruby
272002 [phrogz@ma .c] I have a script that pulls pages from our wiki server. It was working
+ 272107 [phrogz@ma .c] Followup - this does not seem to be a core problem of terminal
| 272246 [phrogz@ma .c] Here are the results from Windows. Binary per se doesn't fail, but
| 272466 [phrogz@ma .c] irb(main):001:0> good = File.open( 'gkhead.jpg', 'rb' ){ |f| f.read };
| + 272493 [phrogz@ma .c] For my last post on this topic, a simpler test case showing Ruby on OS
| + 272499 [daniels@pr n] I would hazard a guess that if you took that 'b' off of the File.open,
|   272577 [phrogz@ma .c] I doubt it, but will try when I get into work. My understanding was
|   272593 [phrogz@ma .c] OK, so this has nothing to do with reading files from disk. The crazy
|   272711 [botp@de mo t] # OK, so this has nothing to do with reading files=20
+ 272497 [daniels@pr n] Install http://ntlmaps.sourceforge.net/ and direct Net::HTTP through

variables with a name ending in question mark
272009 [rogerpack200] question?
272011 [hhausman@gm ] nope.
+ 272021 [dangerwillro] variables ending with ? are not valid in Ruby.
+ 272024 [rogerpack200] Posted via http://www.ruby-forum.com/.
  272265 [rick.denatal] As Jos? Jim?nez

WxRuby StatusBar
272013 [williams.jay] How do you change the text value of a StatusBar in WxRuby?
272028 [alec@ar ro s] <8bd354bf0710011012j197d4529x5cc7f007e6b0bac4@mail.gmail.com>, Jayson

[SOLUTION] [QUIZ] Probable Iterations (#141)
272014 [mental@ry ia] My solution follows.  Nothing fancy this time; just enough to do

Working RubyGems on Windows
272022 [transfire@gm] I really need to get RubyGems working on Windows. Versions 0.9.2,
+ 272029 [dejan.dimic@] I use it all the time on XP
| 272053 [transfire@gm] I described it in the "OneClickInstaller/RubyGems" thread. But I'll
| 272097 [kevwil@gm il] Something must be wrong with your Ruby or RubyGems install. I just
| 272216 [transfire@gm] Updating RubyGems...
+ 272058 [drbrain@se m] I spent many hours with Curt Hibbs getting the one-click installer's
  272212 [transfire@gm] I don't know what to tell you then. It's not working for me. I just
  272232 [drbrain@se m] I can not fix your inability to resolve the address of a hostname
  272239 [transfire@gm] Sorry. At the time I thought we had gotten past the proxy problem. I

64-bit Linux Ruby Problem - Segmentation Fault
272023 [dustin_tosh@] I've been running a basic ruby/rails CRUD application on a 32-bit Red
+ 272035 [wayneeseguin] ...
| 272617 [dustin_tosh@] It seems as though there is some sort of 64-bit memory leak when using
+ 272106 [znmeb@ce ma ] Hmmmm ... /usr/local/lib/ruby/1.8/pstore.rb?? Where is your Ruby

MIME HTML (mhtml) encoding
272042 [JAMES.T.MCLA] charset="us-ascii"

Amazon s3sh socket connection error
272048 [jkhaledsouei] I'm using Windows XP to connect to Amazon webservices using s3sh

Using XSD Module
272049 [btrichardson] Does anyone know where one can find a *good* tutorial on the XSD module

void value expression for 'retry'
272066 [khan.mohamma] ...
+ 272067 [mguterl@gm i] ...
+ 272068 [TimHunter@nc] Ruby doesn't have the post-increment (++) operator. Use retry_count += 1

Config files
272075 [jarvo88@gm i] I am writing an application that will read and grab values from a
+ 272086 [konrad@ty er] charset="utf-8"
+ 272103 [wdierkes@5d ] I prefer using standard *nix style configuration files in the form of
| + 272121 [dejan.dimic@] As told so menu times before: There is no golden hammer.
| + 272125 [phil.meier@g] I like using Ruby directly for doing stuff like this (if the
| + 272452 [bigboss64@ip] Ooo, thank you.. I've been meaning to look for some thing like that :-)
|   272454 [jameskilton@] ...
+ 272293 [Paul.vanDels] I tried to roll my own once - and now I use yaml. :o) Nice and simple, easy to use for
+ 272294 [james@gr yp ] YAML tends to work out well, when it's very simple data fields being

Ruby Contacts Importer?
272077 [williamtkell] Is there a Ruby based email contacts importer? Would like to be able

Stupid error on blocks
272081 [fbrubacher@g] I'm working in Rails but I'm sure this is a 100% Ruby question. I'm
+ 272087 [listbox@ju i] Oh sorry didn't read your case. So you want to select something
| 272088 [listbox@ju i] Right.
| 272092 [fbrubacher@g] Thanks Julian !
+ 272090 [mortee.lists] I'm not really experienced, but I guess your problem is caused because
  272136 [shortcutter@] That's part of the explanation. The other part is scoping because the
  272198 [fbrubacher@g] INCORRECT !
  + 272202 [shortcutter@] Yep.  With #each you get multiple bindings that contain the same name
  + 272241 [mortee.lists] I'd still point out that using both of the above code, the name variable

Re: [QUIZ] Probable Iterations (#141)
272091 [jamesbkoppel] This week's quiz was extremely simple. My solution mostly-worked on the first try.

instance variable/ I'm lost
272093 [schmode93@ya] cousin and read a book so i have some knowlage of what I'm doing.
+ 272095 [alexg@ku cr ] Instance variables are for (as you note below) classes. You don't
| 272100 [hutch@re ur ] Actually instance variables will work fine. See my other post.
| 272102 [schmode93@ya] alright wow thanks for all the posts, ok i understand ur guys's ways,
| 272109 [alexg@ku cr ] First, you never set @correct. You should initialise it to 0 before
| 272110 [schmode93@ya] . You can
| 272114 [alexg@ku cr ] It is in the first example he gave in his first reply.
| 272118 [alexg@ku cr ] class Test
+ 272098 [hutch@re ur ] Welcome!

Fwd: instance variable/ I'm lost
272094 [dangerwillro] ...
272096 [schmode93@ya] ok... do you think you could put it in the code, because i dont now how

Creating a directory with File.makedirs
272111 [petertmarks@] File.makedirs '/folder/subfolder/'
272120 [phil.meier@g] makedir is a method defined in ftools (see
272122 [petertmarks@] ah, of course. Thanks for helping a neub Phil :)
272132 [drbrain@se m] FileUtils.mkdir_p makes directories recursively.

Outputting results as html in a file
272113 [dontspamme@s] a fantasy horse racing league. It works off a csv file I put together
272131 [jgabrielygal] I think you should take a look into ERB

uninstall rubyosx
272133 [mortee.lists] Does someone know how can one uninstall rubyosx, alias the Ruby

272137 [ed.odanow@wo] Moin, moin!
272143 [rff_rffREMOV] I can't answet the question, but I believe you can get that functionality
272209 [ed.odanow@wo] Thank you for this quick response. I've installed it now, and must find
273933 [ed.odanow@wo] I think a RCR is not necessary. I am surprised a bit that only one other
273936 [transfire@gm] On Oct 13, 5:38 am, "Wolfgang N=E1dasi-Donner" <ed.oda...@wonado.de>

a = b = c    order of evaluation weird
272138 [summercoolne] i thought if it is
+ 272140 [dolgun@ex it] a = Array(1..6)
| + 272141 [dolgun@ex it] a = Array(1..6)
| | 272144 [dblack@ru yp] puts returns nil, and you can't index an array with nil.
| | 272152 [dolgun@ex it] Yes, I know, but that isn't the point of the example.   The output
| | + 272156 [dolgun@ex it] a = Array(1..6)
| | + 272158 [calamitates@] My impression was that the OP knew what the evaluation order is, but
| |   272163 [skoot@id ic ] I guess it's safer to say that the order of evaluating arguments is
| |   272175 [dblack@ru yp] ...
| |   + 272193 [lists@be tr ] I never found it's good programming practice in any language
| |   | 272196 [dblack@ru yp] ...
| |   + 272200 [dolgun@ex it] I guess it's safer to say that the order of evaluating arguments is
| |     + 272213 [celtic@sa ry] It demonstrates, at least, that one subscript op is evaluated
| |     | 272233 [dolgun@ex it] How do you know the subscript expression wasn't evaluated from right to
| |     | + 272243 [celtic@sa ry] The first one shows us that our initial double-assignment statement is
| |     | + 272259 [fred@la av .] 20:16 fred@vodka:~/ruby> cat toto.rb
| |     + 272318 [matz@ru y- a] * there's no official specification of the language, so that it is
| + 272142 [dblack@ru yp] Have you tried to run that? :-)
+ 272145 [dblack@ru yp] Although the = associates to the right, the subscript expressions are
+ 272180 [brabuhr@gm i] a = Array(1..100)
+ 272215 [celtic@sa ry] Or, just do a.slice!(a.size/3..a.size*2/3)
  272231 [summercoolne] there are so many people who are familiar with Ruby.  Have been using
  272234 [celtic@sa ry] I've been using it for a year or two now -- I'm lucky enough to have a

Unit testing add extra command line parameters
272139 [alin.popa@gm] #!/usr/bin/ruby
272225 [dolgun@ex it] require "test/unit"
272228 [alin.popa@gm] Thanks for your reply.
+ 272230 [dolgun@ex it] I want to display (yes, just to display) my available tests from a
+ 275831 [scott@sp tt ] Unfortunately, there is no command line option to do what you want.  If

hash key performance
272146 [matthias@wa ] I am just wondering why different hash keys result in such a
272210 [lopx@ga et .] hash.c:rb_any_hash is the answer to your question (funcall('hash') is
272328 [matthias@wa ] So the first two cases of "switch (TYPE(a))" should be enhanced with
272443 [ryand-ruby@z] Send that and your original timings to ruby-core@ and/or file a bug

Variable scope in GServer
272148 [navouri@gm i] I'm having a bit of a problem accessing variables in an instance of GServer.
272150 [lists@be tr ] Please have a look where your message appears when you just

Discarding putc But Not puts
272149 [boss@ai bl d] I'm working with a third-party library that calls both putc and puts
+ 272162 [nicolas.rass] What about
| 272164 [dolgun@ex it] Yep, switching it back to normal.
| + 272167 [nicolas.rass] Oooops! ;-)
| + 272168 [dolgun@ex it] Hmmm...I guess you don't need the *args--apparently putc can only take
| + 272177 [boss@ai bl d] Aliasing back again worked -- thanks.
|   272226 [dolgun@ex it] I think the warning is saying, "Hey, there won't be any reference to the
|   272343 [boss@ai bl d] Ah, I see.  Adding another alias does indeed obviate the warning.
+ 272178 [m_goldberg@a] Running the following code may cast some light on your problem.
| 272342 [boss@ai bl d] Thanks, Morton, that's a good, methodical way to determine what's
+ 272220 [celtic@sa ry] Since I think other people satisfactorily answered the rest, note here

help in my own gsub design..
272154 [josselin@wa ] I don't use it very often, rather copying from example, but it's so
272170 [w_a_x_man@ya] def foo s
272174 [josselin@wa ] thanks a lot , William,  I can see how you built it..  I just have 2
272217 [w_a_x_man@ya] doesn't match your patterns.  The line above is equivalent to
272224 [w_a_x_man@ya] But s may have unwanted spaces.  Stick with $&.

Variable scope in GServer
272155 [navouri@gm i] ...
+ 272221 [celtic@sa ry] This is just a random thought, but what about a class-level hash where
+ 272247 [james@gr yp ] You could make test_hash a local variable and pass it as a parameter

finding files with regular expressions
272160 [remco@hu jd ] I want to search in a directory for files, matching a certain regular
+ 272172 [richard.conr] Look at Ruby's Find library. I am not sure if it can take regexp arguments
+ 272183 [dolgun@ex it] results = []
| 272190 [dblack@ru yp] results = Dir.entries("./programs_ruby").grep(/mod/)
| 272207 [dolgun@ex it] Thanks.  I have some questions though.  I notice that a lot of people
+ 272184 [phrogz@ma .c] Here's my 'findfile' script that I use daily. It lets you use a regexp
+ 272185 [phrogz@ma .c] Sorry, I just re-read your request and saw your desire for an array of
+ 272235 [remco@hu jd ] everybody, thanks for the good advice :)

[ANN] London Ruby User Group - 08th October, 2007
272165 [murray.steel] ...
272169 [murray.steel] ...
272181 [dblack@ru yp] Except it's Sekforde Street :-)
272195 [murray.steel] ...

Error in Loop!!
272182 [JNott@dt .i ] ...
+ 272186 [dolgun@ex it] 0.0 << "hello world"
| 272188 [dolgun@ex it] Whoops.  Not the same error.
+ 272189 [dolgun@ex it] Is there an << operator defined for that class?  Are you sure it

Net::POP3 and Firewall
272192 [mike_houghto] I'm trying to use Net::POP3 from behind a firewall and I can't get past
272254 [mike_houghto] This code woks on my home PC - i.e. no firewall. Does anyone know what's
272257 [ruby@sl gh l] =20
272276 [fwmailinglis] charset="us-ascii"

Whats going on!?!?
272204 [schmode93@ya] Ok so I was programming perfectly fine earlier yesterday, then i got
+ 272205 [phlip2005@gm] Get CygWin (but not its Ruby), and learn to use BASH, a real command
| 272222 [celtic@sa ry] Just quietly, I don't think it's symlinks which mean we don't need a
| + 272256 [phlip2005@gm] No, we just need a rambling /etc folder full of spaghetti
| | 272297 [schmode93@ya] .rb=rbFile
| | 272299 [phlip2005@gm] Click on Start, click on Run, type CMD, press Enter, and enter these
| | 272300 [schmode93@ya] Ok here you go, this is what i get, maybe you guys know what i need to
| | 272301 [schmode93@ya] Sorry, ok so i figured out what gordon was talking about so i i changed
| + 272414 [michael.bevi] ...
|   272481 [schmode93@ya] ok soooo, what can i do to fix it!?!?!
|   272565 [gthiesfeld@g] # Make sure the path to ruby.exe is in your path system environment
|   272670 [schmode93@ya] OK i did both of these checks, both are seem to be fine.
+ 272218 [gthiesfeld@g] While it may be possible to set Windows up to do this, I think it

rdebug / emacs / gud
272211 [jim@we ri hh] I'm trying to run rdebug from within emacs using gud (Grand Unified
272264 [alex.shulgin] Debian/lenny (testing)
272304 [jim@we ri hh] Thanks.  Just to be clear, "no problem" means that you *are* getting the
272344 [alex.shulgin] Right. :-)

A question about threads.
272223 [navouri@gm i] ...
272283 [ben@ta je o.] You could keep a hash of connected clients (managed with

Re: a work day becomes a fun day
272240 [rogerpack200] It does make programming fun, at least for me :)

syncing gems between computers
272255 [ecbearden@gm] Before I write my own capistrano task I was wondering how others sync
272260 [han.holl@gm ] ...

272262 [jarvo88@gm i] I want to create a large hash kind of information field.. basically i
272266 [sepp2k@go gl] Room=Struct.new(:topic,:nicks,:id)
272270 [jarvo88@gm i] Thanks a lot, that was perfect :)
272272 [sepp2k@go gl] => Room
272275 [jarvo88@gm i] Ahh yeah, i was being silly and working with 2 files, and running the

[ANN] RVideo - Ruby video transcoding library
272281 [jon@sl nt is] RVideo has just been released as a gem!

hook, or override const_set, and const_get
272290 [jpywtora@ca ] I have seen some examples of hooking into const_missing; Howerver, I
272292 [drbrain@se m] a) Edit variable.c
272302 [jpywtora@ca ] Thanks Eric.  Option a makes me think I am taking the wrong approach.
272333 [drbrain@se m] Both options are pure evil and guaranteed to cause you pain.

Using the PowerLoom reasoning system with JRuby
272295 [mark.watson@] JRuby continues to please me: fantastic to be able to switch from C-

Count of http requests
272296 [jeff.fry@gm ] Using the YSlow Firebug extension http://developer.yahoo.com/yslow/ ,

[ANN] Boto - RESTful Ruby Content Server
272298 [anthonyeden@] I've open sourced one of my recent projects that I've been playing

problem with ruby installation
272305 [seancolquhou] balking whenever I try to install something using gem install (Mac OS X
272310 [ari@ar br wn] Can't answer your first question but....
272312 [seancolquhou] Thanks! That did the trick. But what's the difference between usr/lib
+ 272323 [dangerwillro] It's like scope.
+ 272370 [rick.denatal] Brief answer
  272408 [dangerwillro] Rick, opt is the MacPorts ( formerly DarwinPorts ) directory.

Problem with Gem
272311 [lwatcdr@gm i] I am trying to install support for SQLite using Gem but I get this error
272395 [drbrain@se m] ruby -rrbconfig -e 'puts File.join(Config::CONFIG["rubylibdir"],
273775 [degreane@gm ] it says /usr/lib/ruby/1.8/i386-linux/ruby.h
+ 273817 [drbrain@se m] Do you have that file?
+ 273829 [drbrain@se m] If you have something constructive to contribute, please do so.