# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=847

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 848

---

## [1.8 and 1.9 on arch linux](https://www.ruby-forum.com/t/1-8-and-1-9-on-arch-linux/165932)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 8\
**Last updated:** [April 21, 2009, 12:52am UTC](https://www.ruby-forum.com/t/1-8-and-1-9-on-arch-linux/165932 "2009-04-21T00:52:50Z")

</div>

Anyone on arch linux? I’m trying to get ruby 1.8 and 1.9 playing nicely together so that I can easily switch the default “ruby” and have everything else (rake, irb, rdoc etc) adjust itself accordingly, ideally without…

---

## [Which ruby is running me?](https://www.ruby-forum.com/t/which-ruby-is-running-me/165925)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 3\
**Last updated:** [April 21, 2009, 12:13am UTC](https://www.ruby-forum.com/t/which-ruby-is-running-me/165925 "2009-04-21T00:13:02Z")

</div>

So I have despaired of getting mutexes, threads and forks to coexist peacably in Ruby. (As soon as the child process touches a mutex that existed in the parent… Bad Things can happen.) So Plan B is to spin a thread t…

---

## [Reek 1.0.0 released](https://www.ruby-forum.com/t/reek-1-0-0-released/164768)

<div class="topic-metadata">

**Author:** [@Kevin\_Rutherford](https://www.ruby-forum.com/u/Kevin_Rutherford)\
**Replies:** 6\
**Last updated:** [April 20, 2009, 11:01pm UTC](https://www.ruby-forum.com/t/reek-1-0-0-released/164768 "2009-04-20T23:01:37Z")

</div>

Hi, Reek version 1.0.0 has been released! Reek detects smells in Ruby code. It can be used as a stand-alone command, or as a Rake task, or as an expectation in Rspec examples. Changes in this release: Major enhance…

---

## [Validate xml](https://www.ruby-forum.com/t/validate-xml/140081)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 2\
**Last updated:** [April 20, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/validate-xml/140081 "2009-04-20T19:45:15Z")

</div>

anyone knows how to validate an xml string a schema using with libxml- ruby? validate\_schema method is only available for XML::Document but not for XML::Reader. regards.

---

## [Question about displaying the content of a file with Ramaze](https://www.ruby-forum.com/t/question-about-displaying-the-content-of-a-file-with-ramaze/165980)

<div class="topic-metadata">

**Author:** [@rubina](https://www.ruby-forum.com/u/rubina)\
**Replies:** 2\
**Last updated:** [April 20, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/question-about-displaying-the-content-of-a-file-with-ramaze/165980 "2009-04-20T18:49:27Z")

</div>

Hi all, I am trying to learn Ramaze and as such I am playing with a very simple script to display the content of a file on a browser. My problem begins when I send multiple records to the browser. Everything is displ…

---

## [Trouble reading a set of files recursively](https://www.ruby-forum.com/t/trouble-reading-a-set-of-files-recursively/165984)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 20, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/trouble-reading-a-set-of-files-recursively/165984 "2009-04-20T17:33:50Z")

</div>

Hello, I am doing a batch run, where I have several .csv files with the same name in different sub-directories. At the end of the batch run, I want to cat all the individual files together, and load them into the dat…

---

## [Oracle buys Sun](https://www.ruby-forum.com/t/oracle-buys-sun/165974)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 2\
**Last updated:** [April 20, 2009, 3:51pm UTC](https://www.ruby-forum.com/t/oracle-buys-sun/165974 "2009-04-20T15:51:05Z")

</div>

I hope everything works out for you, Charles. At least as good as you hope and better than you expect! Interesting days ahead, for sure… To unsubscribe from this list, please visit: http://xircles.codehaus.org/mana…

---

## [Grab Image From Web Server](https://www.ruby-forum.com/t/grab-image-from-web-server/51026)

<div class="topic-metadata">

**Author:** [@lists](https://www.ruby-forum.com/u/lists)\
**Replies:** 6\
**Last updated:** [April 20, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/grab-image-from-web-server/51026 "2009-04-20T15:48:47Z")

</div>

Hi, I am still fairly new to Ruby. Given the URL of an image, I would like to craft some code that grabs the image from the remote Web server and puts it in a file on the local machine. Can anyone give me some tips…

---

## [\[ANN\] ffi-swig-generator 0.3.0](https://www.ruby-forum.com/t/ann-ffi-swig-generator-0-3-0/165975)

<div class="topic-metadata">

**Author:** [@gendag](https://www.ruby-forum.com/u/gendag)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/ann-ffi-swig-generator-0-3-0/165975 "2009-04-20T15:22:51Z")

</div>

ffi-swig-generator version 0.3.0 by Andrea F. http://kenai.com/projects/ruby-ffi/sources/swig-generator/show == DESCRIPTION ffi-swig-generator is a ruby-ffi wrapper code generator that produces ruby-ffi glue code pa…

---

## [Perl2ruby or inline::perl?](https://www.ruby-forum.com/t/perl2ruby-or-inline-perl/165503)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 2:51pm UTC](https://www.ruby-forum.com/t/perl2ruby-or-inline-perl/165503 "2009-04-20T14:51:10Z")

</div>

I would like to use the exiftool library for exif/iptc/xmp image metadata manipulation, but it’s written in Perl. Since it seems somehow wrong and definitely inefficient, I was wondering if there was any sort of perl…

---

## [Help on Ruby Segmentation Problem](https://www.ruby-forum.com/t/help-on-ruby-segmentation-problem/165961)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 4\
**Last updated:** [April 20, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/help-on-ruby-segmentation-problem/165961 "2009-04-20T14:30:40Z")

</div>

hi all… I extend ruby with C. I m new to these kind of stuffs… I integrate my dll namely prov.all into C program namely prov.c afterthat i call those c functions through ruby . irb(main):001:0\> require ‘prov1’ =\> t…

---

## [Jruby -S gem maven ... html\_to\_pdf.rb](https://www.ruby-forum.com/t/jruby-s-gem-maven-html-to-pdf-rb/165862)

<div class="topic-metadata">

**Author:** [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Replies:** 4\
**Last updated:** [April 20, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/jruby-s-gem-maven-html-to-pdf-rb/165862 "2009-04-20T14:30:38Z")

</div>

I was playing with Charlie’s maven gem to make a small sample app that takse and xhtml page and print’s it to a pdf. There are some maven version strings that are not valid gem version strings. Specifically the flying…

---

## [Hash merge question](https://www.ruby-forum.com/t/hash-merge-question/165944)

<div class="topic-metadata">

**Author:** [@random-query](https://www.ruby-forum.com/u/random-query)\
**Replies:** 4\
**Last updated:** [April 20, 2009, 1:33pm UTC](https://www.ruby-forum.com/t/hash-merge-question/165944 "2009-04-20T13:33:12Z")

</div>

Hi All, I have 2 hashes like this. h1 = { a1 =\> \[y1, y2, y3\], a2 =\> \[y4, y5, y6\] } h2 = { a2 =\> \[z1, z2, z3\], a3 =\> \[z4, z5, z6\] } And I nedd to merge them into something like this. h = { a1 =\> \[\[y1, y2, y3\] …

---

## [Hashed matrix](https://www.ruby-forum.com/t/hashed-matrix/165960)

<div class="topic-metadata">

**Author:** [@yoniblond](https://www.ruby-forum.com/u/yoniblond)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/hashed-matrix/165960 "2009-04-20T13:15:22Z")

</div>

Hello, I’d like to use a specific matrix with string as key for lines and integer index for columns. I could also use string for columns (a string version of integer), it doesn’t matter. I use the matrix to store a sm…

---

## [Writing an image to file](https://www.ruby-forum.com/t/writing-an-image-to-file/53519)

<div class="topic-metadata">

**Author:** [@marcus](https://www.ruby-forum.com/u/marcus)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 11:55am UTC](https://www.ruby-forum.com/t/writing-an-image-to-file/53519 "2009-04-20T11:55:29Z")

</div>

I have images stored in a database. I now need to read those images from the database and store to files (using ActiveRecord in a system where $KCODE = ‘u’; require ‘jcode’ is used (if that matters…)). I’ve tried a co…

---

## [Downloading Image](https://www.ruby-forum.com/t/downloading-image/63691)

<div class="topic-metadata">

**Author:** [@ashiro](https://www.ruby-forum.com/u/ashiro)\
**Replies:** 5\
**Last updated:** [April 20, 2009, 11:54am UTC](https://www.ruby-forum.com/t/downloading-image/63691 "2009-04-20T11:54:21Z")

</div>

Hello again As an extension on my previous image problem I can’t even successfully download images from a URL location. I though tthe following simple GET request along with writing the result to a file would work bu…

---

## [Copy image from a website](https://www.ruby-forum.com/t/copy-image-from-a-website/120681)

<div class="topic-metadata">

**Author:** [@studlee2](https://www.ruby-forum.com/u/studlee2)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 11:51am UTC](https://www.ruby-forum.com/t/copy-image-from-a-website/120681 "2009-04-20T11:51:49Z")

</div>

I’m trying to copy an image from a website, but can’t seem to get it right. I know rio can copy a website in one line, but what about images? Anyone have a good snippet using open-uri or something?

---

## [How to read an image from a URL and save it as file?](https://www.ruby-forum.com/t/how-to-read-an-image-from-a-url-and-save-it-as-file/104316)

<div class="topic-metadata">

**Author:** [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 11:50am UTC](https://www.ruby-forum.com/t/how-to-read-an-image-from-a-url-and-save-it-as-file/104316 "2009-04-20T11:50:02Z")

</div>

Thanks

---

## [Regex for capturing images](https://www.ruby-forum.com/t/regex-for-capturing-images/154414)

<div class="topic-metadata">

**Author:** [@ponto](https://www.ruby-forum.com/u/ponto)\
**Replies:** 2\
**Last updated:** [April 20, 2009, 11:48am UTC](https://www.ruby-forum.com/t/regex-for-capturing-images/154414 "2009-04-20T11:48:45Z")

</div>

ok, i’ve written this regex: /(https?:(?:confused:\\w.-)\*(?:.gif|.jpg|.bmp|.png|.jpeg))/i i’ve tested it on rubular. and for this example text: some text rubular outputs me this: Match captures: Result 1 http:/…

---

## [Xxx.valid? still true after xxx.errors.add(...)?](https://www.ruby-forum.com/t/xxx-valid-still-true-after-xxx-errors-add/165952)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 11:16am UTC](https://www.ruby-forum.com/t/xxx-valid-still-true-after-xxx-errors-add/165952 "2009-04-20T11:16:39Z")

</div>

Hi all I have the following code in my controller: if @comment.valid? captcha\_url = “http://captchator.com/captcha/check\_answer/#{captcha\_code}/#{@comment.captcha}” result = open(captcha\_url) unless result.read ==…

---

## [More fixes for core/array specs](https://www.ruby-forum.com/t/more-fixes-for-core-array-specs/165854)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 10:59am UTC](https://www.ruby-forum.com/t/more-fixes-for-core-array-specs/165854 "2009-04-20T10:59:37Z")

</div>

---

## [Ruby1.9 and the retry keyword](https://www.ruby-forum.com/t/ruby1-9-and-the-retry-keyword/165908)

<div class="topic-metadata">

**Author:** [@Yoann\_G](https://www.ruby-forum.com/u/Yoann_G)\
**Replies:** 11\
**Last updated:** [April 20, 2009, 10:43am UTC](https://www.ruby-forum.com/t/ruby1-9-and-the-retry-keyword/165908 "2009-04-20T10:43:08Z")

</div>

Hi It seems that the ‘retry’ keyword is not supported anymore in ruby1.9 to restart a running iteration from the beginning. Is there a way to achieve the old behavior, preferably in a 1.8 compatible way ? $ ruby1.8…

---

## [What's the differences between IO.popen ( or IO.pipe) and PTY.spawn?](https://www.ruby-forum.com/t/whats-the-differences-between-io-popen-or-io-pipe-and-pty-spawn/165931)

<div class="topic-metadata">

**Author:** [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 9:11am UTC](https://www.ruby-forum.com/t/whats-the-differences-between-io-popen-or-io-pipe-and-pty-spawn/165931 "2009-04-20T09:11:46Z")

</div>

Hi, all. The program I want to execute as a external program in ruby is using a write system call. When I use IO.popen or IO.pipe, there is no output because of the external program didn’t flush it’s output. (but, wh…

---

## [Ruby on Windows beyong 1.8.6 how to install?](https://www.ruby-forum.com/t/ruby-on-windows-beyong-1-8-6-how-to-install/165864)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 9:05am UTC](https://www.ruby-forum.com/t/ruby-on-windows-beyong-1-8-6-how-to-install/165864 "2009-04-20T09:05:47Z")

</div>

on page http://www.ruby-lang.org/en/downloads/ for Ruby 1.8.7 and beyond, there is no one-click installer, so how do we install it? by unzipping it and setting some path in autoexec.bat or something like that? is …

---

## [Hpricot parsing](https://www.ruby-forum.com/t/hpricot-parsing/165911)

<div class="topic-metadata">

**Author:** [@mrcfab3](https://www.ruby-forum.com/u/mrcfab3)\
**Replies:** 5\
**Last updated:** [April 20, 2009, 4:25am UTC](https://www.ruby-forum.com/t/hpricot-parsing/165911 "2009-04-20T04:25:51Z")

</div>

Ruby newbie here Have successfully used hpricot to scrape correct from desired page http://www.montgomeryadvertiser.com/section/obits using doc = Hpricot(uri above) … @grab1 = doc.search(“//div\[@class=‘article-bod…

---

## [Http://rubypan.org/](https://www.ruby-forum.com/t/http-rubypan-org/165649)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 15\
**Last updated:** [April 20, 2009, 3:47am UTC](https://www.ruby-forum.com/t/http-rubypan-org/165649 "2009-04-20T03:47:46Z")

</div>

http://rubypan.org/ version 1.0.0 has been released! http://rubypan.org/ RubyPAN dot org is like CPAN dot org but for Ruby Gems. The source for rubypan.org is located here: GitHub - tenderlove/rubypan To report a …

---

## [Rubytest.vim 0.9.0](https://www.ruby-forum.com/t/rubytest-vim-0-9-0/165897)

<div class="topic-metadata">

**Author:** [@flowerborn](https://www.ruby-forum.com/u/flowerborn)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 3:40am UTC](https://www.ruby-forum.com/t/rubytest-vim-0-9-0/165897 "2009-04-20T03:40:44Z")

</div>

Hi list, I’m pleased to announce the first release of rubytest, which is a vim plugin aims to help you run ruby test (including vanilla test, rspec, shoulda etc.) conveniently. http://www.vim.org/scripts/script.php?s…

---

## [Having problems accessing Oracle](https://www.ruby-forum.com/t/having-problems-accessing-oracle/165654)

<div class="topic-metadata">

**Author:** [@rjberry](https://www.ruby-forum.com/u/rjberry)\
**Replies:** 10\
**Last updated:** [April 20, 2009, 2:48am UTC](https://www.ruby-forum.com/t/having-problems-accessing-oracle/165654 "2009-04-20T02:48:41Z")

</div>

First approach: bare metal require ‘java’ require ‘rubygems’ require “c:/ruby/jruby-1.2.0/lib/ojdbc14.jar” # should be redundant, but tried it anyway odriver = Java::JavaClass.for\_name(“oracle.jdbc.driver.OracleDr…

---

## [Reffering back to caller's binding](https://www.ruby-forum.com/t/reffering-back-to-callers-binding/165873)

<div class="topic-metadata">

**Author:** [@oweinh](https://www.ruby-forum.com/u/oweinh)\
**Replies:** 8\
**Last updated:** [April 20, 2009, 1:16am UTC](https://www.ruby-forum.com/t/reffering-back-to-callers-binding/165873 "2009-04-20T01:16:16Z")

</div>

Hello Rubyists, I am trying to define a helper method which displays a ruby expression and then displays the results of that expression via puts. Initially I did this, which obviously did not work: def peval( express…

---

## [String replacing help](https://www.ruby-forum.com/t/string-replacing-help/165894)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 5\
**Last updated:** [April 19, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/string-replacing-help/165894 "2009-04-19T22:42:55Z")

</div>

I’m working with Mechanize doing some screen scraping. Because of the project, I have to use an older version of Mechanize for now, I’m using 0.8.4. The goal of what I’m trying to do is take a string and insert pipes …

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=846)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=848)
