363976-369568 subjects 364394-384710
newbie 1.8.7 to 1.9.1 problem
364229 [phillipricha] Several scripts that used to work now don't. I had not used ruby or any
+ 364231 [m.fellinger@] iota ~ % irb
+ 364250 [shortcutter@] You just need to replace #each with #each_line and be done. I believe
+ 364258 [b.candler@po] That's right.
Does Oniguruma support unicode properties??
364232 [ntysdd@gm il] Well,when i want to use property in the regexp,ruby does complain that
364233 [m.fellinger@] Just make sure your String has correct Unicode encoding.
364248 [runrun@ru pa] I put together http://redmine.ruby-lang.org/repositories/entry/ruby-19/doc/re.rdoc
How can I call foo in Bar.foo ?
364235 [ntysdd@gm il] it's like this
+ 364237 [josh.cheek@g] I won't advocate this as a solution, but it does seem to meet your
+ 364241 [shortcutter@] It does not really make sense since the first #foo you define is an
[ANN] ruby-growl 2.0 Released
364236 [drbrain@se m] ruby-growl version 2.0 has been released!
DateTime about the zone
364239 [unbewusst.se] "20100612" for the date, that's ok for today
+ 364243 [b.candler@po] => #<DateTime: 212143080869/86400,1/12,2299161>
+ 364244 [b.candler@po] You mean it's 093429 local time in France?
364245 [unbewusst.se] yes, it was )))
Windows and Linux Tips
364246 [pavelhaque@g] Do u need Windows and Linux Tips?
ocra Tk "_invoke_without_enc"
364247 [mipurghart@k] I would like to convert a ruby.file into an *.exe. (Important: I use the
364329 [rogerpack200] My guess is that ocra is packaging your .rb files but not your .tcl
364347 [nagai@ai ky ] If it is the reason of why, Ruby/Tk-Kit version of tcltklib.so may
nokogiri error on snow leopard
364249 [ermercado@gm] Mac OS X Snow Leopard
+ 364260 [ryand-ruby@z] dlopen(/usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokog=
| 364263 [drbrain@se m] nokogiri'
| 365090 [info@ww eb i] thanks a lot! This sorted me out, though I'd like to add that my rails
+ 364264 [sora134@gm i] 'No suitable image found' error occurs if arch different between ruby
| 364266 [ryand-ruby@z] ...
| 364267 [sora134@gm i] Sorry for I missed that post.
+ 364473 [ermercado@gm] i've upgraded ruby to 1.9.1, it's working fine now.
2010 world cup Brazil jerseys,paypal payment and free shipping
364252 [rainr91@ya o] 2010 world cup Brazil jerseys,paypal payment and free shipping
Where are the downloads for Ruby 1.9.2?
364254 [mattslay@jo ] I'm wanting to play with Rails 3 Beta 4, and from what I can tell, I
+ 364256 [luislavena@g] You would need 7-zip to extract the package. Put in any directory like
+ 364257 [b.candler@po] The question is best asked on a Rails list, but I think 1.8.7 is
Multiple rakes on OSX
364259 [steve@st ve ] Hey guys-
364261 [josh.cheek@g] In my ~/.profile, rvm sources a bunch of bash scripts that allow it to
require fails when requiring scripts with utf-8 filenames.
364262 [odengfel@br ] the filename.
+ 364271 [odengfel@br ] Tried 1.9.2 preview3 and it works!
| 364281 [billk@ct .c ] 1.9.1 has barely any support for Unicode paths
| 364287 [billk@ct .c ] Sorry... Just noticed this isn't relevant to your
+ 364282 [b.candler@po] Who knows? If you can find an official spec for how Strings work in ruby
State of the union for Ruby CLI libraries?
364268 [johnf@di tb ] I am starting construction on a somewhat complicated internal
+ 364278 [transfire@gm] OptionParser generally works fine --even for the items you mention. To
| 364637 [sentinel1879] I just found a great example of how you can use subcommands with
| 364640 [shortcutter@] I would modify that approach because it has the drawback of wasting CPU
| 364643 [sentinel1879] I have actually isolated this into a seperate module with a method named
| 364647 [sentinel1879] Robert,
| 364670 [shortcutter@] Well, either you revert back to creating all sub OptionParsers or you
| 364673 [sentinel1879] Actually i did find a way out !!
+ 364292 [reinh@re nh ] After recently reviewing the state of the art for Ruby CLI tools myself
| 364565 [b.candler@po] There's one I can never remember the name of, but is something to do
| 364569 [sentinel1879] William Morgan, hehe :-)
+ 364566 [sentinel1879] There's also visionmedia's commander
+ 364567 [sentinel1879] That's a trivial issue. All you need is the constants for colors. One
+ 364576 [sentinel1879] John,
| 364577 [sentinel1879] $ commander init
+ 364922 [gabriel.horn] I keep lists of related gems on delicious that could help.
364933 [sentinel1879] I've been looking into more detail into the thor documentation and the
Do I overuse class methods?
364269 [spam@z. up .] I write in ruby for few weeks and I have noticed that in ruby I use
364293 [reinh@re nh ] Classes are designed to instantiate objects. If you have classes that
364306 [shortcutter@] As a compromise Michael could use module Singleton and thus define
364327 [spam@z. up .] I think this is interesting idea.
364335 [reinh@re nh ] Ruby's design patterns (in the Gang of Four sense) are extremely
364443 [spam@z. up .] Let me put it this way: replace all of your
364464 [reinh@re nh ] I would prefer that you use modules for "stateless classes" that you
[ANN] Rack 1.2, a modular Ruby webserver interface
364270 [chneukirchen] Today we are proud to announce the release of Rack 1.2.
Idiomatic Printing an array with commas
364272 [brotman@nc r] I want to print an array (of strings, mostly) with commas separating the
+ 364274 [dominikh@fo ] a = ["one", "two", "three"]
+ 364283 [b.candler@po] You want String#inspect. (irb calls #inspect on the object it's
| 364297 [brotman@nc r] I tried it and that appears to be exactly what I need!!
+ 364286 [pxthanh299@g] You can always try a * ", "
| 364557 [brotman@nc r] ".inspect", ".join", "*". Of course, there isn't just one way to get
| 364560 [reinh@re nh ] Well, Array#inspect makes use of behavior identical to that of
+ 364288 [josh.cheek@g] As other people have pointed out, you are looking for the inspect method. If
+ 364290 [reinh@re nh ] If you want it to "look like the result in the irb", you want Array#inspect.
Loading a module without polluting my namespace
364273 [sin3141592@g] Hey folks!
+ 364276 [transfire@gm] Usually the file you are loading has the "protective" namespace. Eg.
+ 364277 [joelvanderwe] def make_mod
| 365549 [dreamcat4@gm] This is great, but seems to blows up when requiring other files
| + 365632 [joelvanderwe] Is it possible to simplify the example a bit? I can't tell where the
| | + 365639 [dreamcat4@gm] Thanks for replying,
| | + 365661 [dreamcat4@gm] Here is the example2.rb, but modified to reproduce this scenario.
| + 365774 [joelvanderwe] Yes. The problem is in the way your script references the other files.
| 365783 [dreamcat4@gm] Here is a fix to the require() and load() methods. Its easier to patch
| + 365787 [dreamcat4@gm] +++ b/lib/script.rb
| + 365827 [joelvanderwe] Sure, that makes sense. I'll merge that in the next release. Thanks!
+ 364284 [b.candler@po] Kernel.load(filename, true) might help. But AFAIK that doesn't prevent
| 364304 [sin3141592@g] Thanks for your reply but I'm afraid that doesn't solve my problem. I
| + 364318 [b.candler@po] I wish 'load' would simply return the anonymous module it has created,
| | 364323 [sin3141592@g] Exactly this behavior I would have loved and needed. What a bummer that
| + 364320 [joelvanderwe] That's correct (you can't access it without playing tricks like global
| + 364321 [joelvanderwe] Your example is not quite right.
+ 364291 [reinh@re nh ] Kernel#require does not namespace anything, no matter how you use it.
+ 364296 [reinh@re nh ] Also, properly written, it's "Ruby". Oops.
+ 364509 [sin3141592@g] I happen to be in control of the loaded modules but I think you didn't
To access a webpage multiple times
364275 [sandeep.maxc] I have a website : where I have to input data into multiple text-bars
364285 [b.candler@po] Have a look at the mechanize gem.
User input with predefined and editable/completable entry
364279 [rbenit68@gm ] I need to code an user entry (text mode) which appears with a default
[ANN] PenTBox Security Suite 1.3.2
364280 [alberto.kun6] I'm proud to present you Penetration Testing Box (*PenTBox*), a Security
serialport won't thread (new to ruby)
364289 [secesh@gm il] def readSerial
364543 [rogerpack200] What is TTY?
NoMethodError, most likely foolish...
364294 [minifridger@] So I am fairly new to ruby and I'm using the language to work on a new
+ 364295 [reinh@re nh ] Methods defined in the global scope (on the object that Ruby calls
+ 364301 [lists@gr gw ] Don't use self.version_info? -- just call version_info?
Is there a current ruby binding to libevent?
364305 [reid.thompso] Is anyone aware of a current binding to libevent?
+ 364309 [dido.sevilla] There have been attempts to make one but it has proven to be more
+ 364311 [tony.arcieri] Tony Arcieri
| + 364324 [reinh@re nh ] You may also want to check out EventMachine, a similar event-driven
| + 364328 [dsisnero@gm ] Yes, but the newer version of libevent is going to have IOCP support in
| 364540 [rogerpack200] libevent bindings would be nice, for just that reason. I also have this
| 364547 [tony.arcieri] It shouldn't be too difficult to take Rev and modify it to use libevent as
+ 390412 [w1rele55@ya ] Posted via http://www.ruby-forum.com/.
390438 [jeremy@hi eg] There are a couple of good event loop libraries in Ruby, probably the most
[ANN] REVISED DEADLINE for Scheme and Functional Programming Workshop
364307 [feeley@ir .u] Please note that the deadline for submitting papers to the Scheme
The Ruby Hoedown 2010 -- The FREE Regional Ruby Conference -- Sept 3-4, 2010, Nashville, TN
364308 [jeremymcanal] I just opened registration and the CFP for the Ruby Hoedown 2010,
Strange thing with method lookup
364310 [michel@de az] It happens in a quite complex fxruby application, and I am not able to
Regular expressions in Ruby
364312 [abder.rahman] I'm new to Ruby, and just want to ask about how to read the following
+ 364313 [saurabh.purn] I suppose this shall help
+ 364314 [lparravi@gm ] $ matches the end of the string and i makes the search case
+ 364315 [marco-oweber] -> http://rubular.com/ -> Regex quick reference
+ 364316 [jgabrielygal] $ matches the end of a line or string
+ 364317 [b.candler@po] Posted via http://www.ruby-forum.com/.
| 364322 [abder.rahman] Thanks Brian.
+ 364344 [josh.cheek@g] It matches a dot, followed by either gif or jpg or png, at the end of the
+ 364345 [reinh@re nh ] After referring to the regular expressions references provided, test
364330 [rogerpack200] x = "(some fallback value)" unless respond_to? :x or x
+ 364332 [rick.denatal] I don't know where you read that, but it has no basis in reality. The
| + 364338 [reinh@re nh ] Rick,
| + 364341 [josh.cheek@g] This implies to me that if x is not defined, then return y without modifying
| 364352 [rick.denatal] Yeah it was a typo on my part
+ 364337 [reinh@re nh ] a ||= b
| 364340 [vikkous@gm i] Except if there's a method named a, defined?(a) returns "method", so
| 364343 [reinh@re nh ] Yes, thank you for your meta-pedantry ;)
+ 364339 [dominikh@fo ] Sure you don't mean ||= as a way of easily implementing basic
+ 364375 [b.candler@po] foo ||= 5
| 364377 [rick.denatal] NO it is NOT, although many Rubyist seem to cling to this idea.
| 364510 [b.candler@po] I never said that foo.x ||= 5 behaves like this. This *is* a method call
| 364524 [rick.denatal] No, but you said that "foo ||= 5 is shorthand for foo = foo || 5"
+ 364575 [shortcutter@] x ||=3D (x() rescue "(some fallback value)")
split doesn't work
364331 [jmasonlee@gm] <% @terms.each do |term| %>>
+ 364333 [sora134@gm i] This line is run only and doesn't output value.
| 364334 [ammarabuali@] Sora's suggestion works, but doesn't explain what is going on. The
+ 364388 [b.candler@po] Firstly, I suggest you write this as a standalone ruby program without
364425 [jmasonlee@gm] Thanks for your help Brian I figured out that I was telling def to
Placement of require() and missing symbols
364342 [eveith@ww eb] I'm trying to understand the way Ruby resolves symbol names and how the
+ 364353 [rick.denatal] Yes
| + 364354 [transfire@gm] Yea, well, except for the fact that they are broken.
| + 364363 [eveith@ww eb] Rick,
+ 364365 [wyhaines@gm ] The code is executed in a linear fashion.
364379 [eveith@ww eb] charset="iso-8859-1"
364381 [wyhaines@gm ] The best practice is to put it where it makes sense to put it, bearing
RDBI needs reviewers
364346 [erik@ho le s] RDBI is a rewrite of the notable Ruby/DBI database interface library,
364494 [sentinel1879] Sadly, in all these years I have still not been able to find a decent
364495 [erik@ho le s] Yes, Please look at RDBI::Schema and RDBI::Column -- the interface is
gsub: invalid byte sequence in US-ASCII
364349 [sentinel1879] I download the page http://www.ruby-forum.com/forum/4 using wget. Then i
+ 364369 [b.candler@po] Replacing ruby 1.9.x with ruby 1.8.x is just as effective, and I would
| + 364395 [sentinel1879] 1. I have moved to 1.9 long back. Don't want to move back.
| + 364396 [sentinel1879] Ok, I've got it. The problem occured when the program was run by cron.
+ 364389 [vikkous@gm i] Handling this kind of thing right means tracking encodings right....
364390 [billk@ct .c ] For the OP, I'd expect `ruby -EBINARY ...` or `ruby -EASCII-8BIT ...`
[ANN] RubyKaigi 2010: PGP Keysigning Party
364350 [shyouhei@ru ] A PGP Keysigning party will be held at RubyKaigi 2010. If you get intere=
[ANN] Rack 1.2.1, a modular Ruby webserver interface
364351 [chneukirchen] Today we are proud to announce the release of Rack 1.2.1.
ruby spreadsheet german umlaute
364355 [u.gotzes@go ] I'm having a problem with ruby's spreadsheet gem.
364356 [jonathan@jm ] Are you running Windows with Ruby 1.9.1? I know that unicode filename
364357 [u.gotzes@go ] ding
364358 [jonathan@jm ] If you are using a 1.8.x, it might be as simple as setting $KCODE to 'U' or
Unexpected behavior in inject
364359 [imphasing@gm] I ran across something that puzzled me today, and I thought I'd ask here and
+ 364360 [jonathan@jm ] Yes, this is exactly as expected. The last statement you put in the block
| 364362 [imphasing@gm] by
+ 364361 [josh.cheek@g] Let me give you a slightly different example to show how it works: You pass
364364 [imphasing@gm] pass
364366 [orlenko.stas] I have Fixnum. I want to check does this value integer or float, i. e.
+ 364367 [b.candler@po] "Fixnum" means "fixed point", or really "small integer": a Fixnum can
+ 364368 [eveith@ww eb] Hey,
+ 364370 [default@sp r] 2010/6/15 Stanislav Orlenko <email@example.com>
364371 [martindemell] I'm investigating the use of DataMapper to convert an old project with
+ 364372 [user@co pg o] Martin,
| 364378 [martindemell] Thanks, that caught it. Still doesn't show up in the traceback when I
+ 364380 [richard.conr] DataMapper has changed a bit over the last few months, so I cant help you
+ 364385 [user@co pg o] Richard,
+ 364386 [martindemell] That's great to hear. I love the looks of DM's ORM stuff, and would
+ 364398 [groups.2009a] legacy schema, and error feedback was limited.
| 364437 [dan.kubb@gm ] This thread was started by someone having problems using an ORM with a
| + 364444 [martindemell] Actually my main problem isn't the legacy schema, it's datamapper's
| + 364457 [groups.2009a] you to not be misled by the word "legacy."
+ 364404 [richard.conr] <crossposted from Ruby-Talk>
| 364424 [hassan.schro] ...and you're going to help fix that?
| 364431 [richard.conr] Conditional or dependent validations in
+ 364476 [groups.2009a] I owe Sequel an apology; I slandered it in an earlier post...
Looking for some documentation.
364373 [shef.hauwang] Hey Guys! Anyone know where I can find some documentation for using
+ 364374 [jonathan@jm ] sending those verbs around, and the docs are pretty good.
| 364376 [shef.hauwang] Awesome, thanks for the fast response!
+ 364383 [astahl@hi .c] I've recently gone through the same exercise... found the Net::HTTP
Execute ruby file from a ruby file
364382 [gregorylepac] I can't find out how can I execute my ruby script from another ruby
+ 364384 [wyhaines@gm ] ri Kernel#system
+ 364387 [b.candler@po] system "ruby", "jobs/eventParser.rb", "5454353"
Simulating keystrokes for automated user input
364391 [ryan.mohr@gm] I've written a simple console app (type command. get results. repeat.)
+ 364392 [joelvanderwe] What about ruby's PTY lib?
+ 364393 [brabuhr@gm i] bot-class
+ 364401 [b.candler@po] Spawn a pty. There's pty.so in the standard library, which is a C
364451 [ryan.mohr@gm] Thanks for the suggestion Brian but I don't think that will work for my
364455 [b.candler@po] Then I think you're stuck. When your ruby process was started, its stdin
364469 [ryan.mohr@gm] In addition to the CLI, I'm developing a simple gui interface. As the
+ 364470 [brabuhr@gm i] In the GUI program run the CLI via PTY.spawn and let the GUI program
+ 364472 [e.j.jurman@g] I don't exactly understand what your trying to make, but in any