# Ruby

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

[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:** 1411

---

## [RMagick -- TIF to PDF](https://www.ruby-forum.com/t/rmagick-tif-to-pdf/109548)

<div class="topic-metadata">

**Author:** [@paron](https://www.ruby-forum.com/u/paron)\
**Replies:** 2\
**Last updated:** [July 18, 2007, 7:34pm UTC](https://www.ruby-forum.com/t/rmagick-tif-to-pdf/109548 "2007-07-18T19:34:33Z")

</div>

This works: require ‘RMagick’ img\_array = Magick::Image.read(‘C:/test.tif’) imgs = Magick::ImageList.new for image in img\_array image = image.negate image.compression= Magick::LZWCompression imgs\<\<image end imgs…

---

## [RAILS Views: entering NULL](https://www.ruby-forum.com/t/rails-views-entering-null/109574)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [July 18, 2007, 7:01pm UTC](https://www.ruby-forum.com/t/rails-views-entering-null/109574 "2007-07-18T19:01:31Z")

</div>

I have looked around the net and can’t find the answer to this question. I have a date column that is allowed to be null. How do I allow the user to enter a null date in the form? Old hand at Ruby, new to RAILS…

---

## [Nebular Gauntlet v0.5](https://www.ruby-forum.com/t/nebular-gauntlet-v0-5/109759)

<div class="topic-metadata">

**Author:** [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 6:08pm UTC](https://www.ruby-forum.com/t/nebular-gauntlet-v0-5/109759 "2007-07-18T18:08:25Z")

</div>

So it has been almost 6 months since the last release of Nebular Gauntlet, which is too long. This release features many improvements over the last one as seen below. However, I have disabled multiplayer in this rele…

---

## [\[()\] dumps core](https://www.ruby-forum.com/t/dumps-core/109734)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/dumps-core/109734 "2007-07-18T17:47:24Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -ve ‘\[()\]’ ruby 1.9.0 (2007-07-18 patchlevel 0) \[i686-linux\] – control frame ---------- c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------ –…

---

## [Logging Rake shell command output](https://www.ruby-forum.com/t/logging-rake-shell-command-output/109758)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/logging-rake-shell-command-output/109758 "2007-07-18T17:46:23Z")

</div>

Has anyone else had the desire to log verbose shell command output with Rake instead of sending it to stdout? For my Rake application I aliased FileUtils#sh to append “\>\> /tmp/ mylogfile.log 2\>&1” to every command th…

---

## [Type conversion](https://www.ruby-forum.com/t/type-conversion/109686)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 6\
**Last updated:** [July 18, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/type-conversion/109686 "2007-07-18T17:09:21Z")

</div>

So there is an to\_s for strings and a to\_i for integers. However, if I have an array of integers and I want to grab one, I get back and ASCII character. For example, when I grab a 1 from the array it returns a 49 - bu…

---

## [Time range min/max inconsistency](https://www.ruby-forum.com/t/time-range-min-max-inconsistency/109652)

<div class="topic-metadata">

**Author:** [@Fischer\_KrisztiSSSS](https://www.ruby-forum.com/u/Fischer_KrisztiSSSS)\
**Replies:** 6\
**Last updated:** [July 18, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/time-range-min-max-inconsistency/109652 "2007-07-18T16:56:16Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I created a range of Time objects. My problem (?) is, that the range’s min() and max() methods return their values in a different format. I made the following test: …

---

## [Convert String to Time object](https://www.ruby-forum.com/t/convert-string-to-time-object/109738)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [July 18, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/convert-string-to-time-object/109738 "2007-07-18T15:11:29Z")

</div>

Hi all, I have a problem, I cannot convert string to Time. I wrote function, but they don’t work: def string\_to\_time(string) return string unless string.is\_a?(String) time\_hash = Date.\_parse(string) new\_time = Time…

---

## [Heap fragmentation in a long-running ruby process](https://www.ruby-forum.com/t/heap-fragmentation-in-a-long-running-ruby-process/109742)

<div class="topic-metadata">

**Author:** [@spreadsheet](https://www.ruby-forum.com/u/spreadsheet)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/heap-fragmentation-in-a-long-running-ruby-process/109742 "2007-07-18T15:09:52Z")

</div>

Abstract In a long-running ruby process with a highly dynamic object-space, we encountered performance degradation and finally memory-allocation failure due to heap fragmentation. The problem can be mitigated by lin…

---

## [Libxml-ruby causes "Bus error" on Mac OS 10.4.10](https://www.ruby-forum.com/t/libxml-ruby-causes-bus-error-on-mac-os-10-4-10/109735)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/libxml-ruby-causes-bus-error-on-mac-os-10-4-10/109735 "2007-07-18T14:21:45Z")

</div>

Hi! I tried to validate a XML-file with a XSD-file with libxml-ruby. On my Mac (Mac OS 10.4.10, Ruby ruby 1.8.6 (2007-03-13 patchlevel 0) \[i686- darwin8.10.1\]) the folowing error message appears: $ ruby testxsd.rb t…

---

## [P(65536\*\*(1\<\<29)) stalls](https://www.ruby-forum.com/t/p-65536-1-29-stalls/109646)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 5\
**Last updated:** [July 18, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/p-65536-1-29-stalls/109646 "2007-07-18T14:13:44Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B e$B0J2\<$N$h$&$K$9$k$HH?1~$,$J$/$J$j$^$9!#e(BCtrl+C e$B$G$b;\_$a$i$l$^$;$s!#e(B $ ./ruby -ve ‘p(65536\*\*(1\<\<29))’ ruby 1.8.6 (2007-07-17 patchlevel 5000) \[i686-linux\] $ ./ruby -ve ‘p(65536\*\*(1\<\<2…

---

## [Optional return values](https://www.ruby-forum.com/t/optional-return-values/109722)

<div class="topic-metadata">

**Author:** [@andreas](https://www.ruby-forum.com/u/andreas)\
**Replies:** 3\
**Last updated:** [July 18, 2007, 1:36pm UTC](https://www.ruby-forum.com/t/optional-return-values/109722 "2007-07-18T13:36:38Z")

</div>

Hi, I have a few methods that check permissions, e.g. unless user.can\_view?(object) puts “go away” end What I want do do now is add the possibility to give the caller more information why the user doesn’t have perm…

---

## [Yet another text parser](https://www.ruby-forum.com/t/yet-another-text-parser/109720)

<div class="topic-metadata">

**Author:** [@lasastard](https://www.ruby-forum.com/u/lasastard)\
**Replies:** 5\
**Last updated:** [July 18, 2007, 1:12pm UTC](https://www.ruby-forum.com/t/yet-another-text-parser/109720 "2007-07-18T13:12:26Z")

</div>

Hi, I have yet another question about how to write a specific text parser in ruby… So, without further ado - this is what the source file looks like: Query= gi|23510597|emb|CAD48982.1| ring-infected erythrocyte surfa…

---

## [Easily parsing a string to retrieve values and assign them t](https://www.ruby-forum.com/t/easily-parsing-a-string-to-retrieve-values-and-assign-them-t/109718)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [July 18, 2007, 11:38am UTC](https://www.ruby-forum.com/t/easily-parsing-a-string-to-retrieve-values-and-assign-them-t/109718 "2007-07-18T11:38:13Z")

</div>

Hi! I’ve been looking in API’s for a while in desperate need for an easy way to parse string and retrieve data (forget about Regexp or scanf), so that any non-rubyist guy I work with could describe, with a single str…

---

## [Re-run unit test-suite](https://www.ruby-forum.com/t/re-run-unit-test-suite/109643)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [July 18, 2007, 10:08am UTC](https://www.ruby-forum.com/t/re-run-unit-test-suite/109643 "2007-07-18T10:08:57Z")

</div>

Hi, I have parametrised the data of my unit test methods. However I would like to re-run the test class, but I am unable to do this with the require method. require ‘test/unit’ require ‘Test\_Suite\_1’ require ‘Test\_…

---

## [Log4r configuration: "/dev/null" outputter question](https://www.ruby-forum.com/t/log4r-configuration-dev-null-outputter-question/109638)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 2\
**Last updated:** [July 18, 2007, 10:03am UTC](https://www.ruby-forum.com/t/log4r-configuration-dev-null-outputter-question/109638 "2007-07-18T10:03:57Z")

</div>

Well, my code does seem to work, but I have the feeling that I could have done it much simpler… So here is my problem: I would like to control log4r via an environment variable, which can contain one of 4 types of va…

---

## [Widgetz.rb](https://www.ruby-forum.com/t/widgetz-rb/109715)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 9:48am UTC](https://www.ruby-forum.com/t/widgetz-rb/109715 "2007-07-18T09:48:55Z")

</div>

NAME widgetz.rb SYNOPSIS simple widgets for rails INSTALL gem install widgetz URIS http://rubyforge.org/projects/codeforpeople/ http://codeforpeople.com/lib/ruby/widgetz/ http://drawohara.tumblr.com/post/6060120 …

---

## [Problem in compilation and installation of Ruby 1.9](https://www.ruby-forum.com/t/problem-in-compilation-and-installation-of-ruby-1-9/109078)

<div class="topic-metadata">

**Author:** [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Replies:** 11\
**Last updated:** [July 18, 2007, 8:52am UTC](https://www.ruby-forum.com/t/problem-in-compilation-and-installation-of-ruby-1-9/109078 "2007-07-18T08:52:48Z")

</div>

Hi This mail is regarding the errors and warnings I got while compiling Ruby 1.9. I have downloaded the Ruby 1.9 source code from the link http://svn.ruby-lang.org/repos/ruby/trunk/ and I try to compile the code but …

---

## [Backgroundb question](https://www.ruby-forum.com/t/backgroundb-question/109712)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 7:51am UTC](https://www.ruby-forum.com/t/backgroundb-question/109712 "2007-07-18T07:51:43Z")

</div>

Two actualy: How to automatically delete worker when the job is done? Must the backgroundrb be restarted if the worker code has changed. Or is there another way. If it has anything to do with this I have :rails\_env: …

---

## [A JavaCC book](https://www.ruby-forum.com/t/a-javacc-book/109700)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 7:26am UTC](https://www.ruby-forum.com/t/a-javacc-book/109700 "2007-07-18T07:26:42Z")

</div>

Hi all - This is rather off-topic, but I know lots of folks interested in general programming language stuff hang out here. And Dave’s post about Joe Armstrong’s Erlang book went over well, so I’ll chance it. …

---

## [Help required for the compilation of ruby 1.9](https://www.ruby-forum.com/t/help-required-for-the-compilation-of-ruby-1-9/109709)

<div class="topic-metadata">

**Author:** [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 7:03am UTC](https://www.ruby-forum.com/t/help-required-for-the-compilation-of-ruby-1-9/109709 "2007-07-18T07:03:54Z")

</div>

Hi We have downloaded the Ruby 1.9 source code from the link â€œhttp://svn.ruby-lang.org/repos/ruby/trunk/â€ and we tried to compile the code but we got following error and â€œmakeâ€ fails at the execution of comma…

---

## [Graphing/charting application](https://www.ruby-forum.com/t/graphing-charting-application/109443)

<div class="topic-metadata">

**Author:** [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Replies:** 24\
**Last updated:** [July 18, 2007, 5:55am UTC](https://www.ruby-forum.com/t/graphing-charting-application/109443 "2007-07-18T05:55:35Z")

</div>

I’m hunting around for a simple application that generates images like bar graphs. PNG output would be ideal. I just need to create a chart or two, so I’m not sure that learning the API for a new library and writing …

---

## [Spin buffers](https://www.ruby-forum.com/t/spin-buffers/109507)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 8\
**Last updated:** [July 18, 2007, 4:44am UTC](https://www.ruby-forum.com/t/spin-buffers/109507 "2007-07-18T04:44:25Z")

</div>

Hmm. Just being reading the Dr. Dobbs. I certainly have hit the bottleneck talked about in this article… Spin Buffers | Dr Dobb's when using the ‘thread.rb’ Queue class. I hacked around it by creating a Queue of Arra…

---

## [Net::FTP](https://www.ruby-forum.com/t/net-ftp/109669)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 4\
**Last updated:** [July 18, 2007, 4:15am UTC](https://www.ruby-forum.com/t/net-ftp/109669 "2007-07-18T04:15:12Z")

</div>

Hey all, I’m having trouble with Net::FTP’s dir command. I’m looking to get a list of all the directories, but instead I get a list of every file IN every directory, and the permissions and timestamps as well. Is the…

---

## [DLTK support in new Eclipse (v. 3.3 - "Europa")](https://www.ruby-forum.com/t/dltk-support-in-new-eclipse-v-3-3-europa/109694)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 12:37am UTC](https://www.ruby-forum.com/t/dltk-support-in-new-eclipse-v-3-3-europa/109694 "2007-07-18T00:37:33Z")

</div>

Has anyone looked at the new IDE support in Eclipse for Ruby (via their new Dynamic Language Toolkit - DLTK) as opposed to RDT? Wes

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/109692)

<div class="topic-metadata">

**Author:** [@vbarre](https://www.ruby-forum.com/u/vbarre)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 12:11am UTC](https://www.ruby-forum.com/t/unsubscribe/109692 "2007-07-18T00:11:42Z")

</div>

– Michel B.

---

## [Memcache C extension](https://www.ruby-forum.com/t/memcache-c-extension/109683)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 6\
**Last updated:** [July 17, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/memcache-c-extension/109683 "2007-07-17T23:36:38Z")

</div>

I’ve decided I want to become more proficient in C, so the project is chose is a ruby memcache C extension. I found the following site with a hash algorithm that seems to be an improvement on the default on, can anyo…

---

## [Possibly bulletproof eval()](https://www.ruby-forum.com/t/possibly-bulletproof-eval/109596)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 14\
**Last updated:** [July 17, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/possibly-bulletproof-eval/109596 "2007-07-17T21:59:25Z")

</div>

I’ve got a class which loads files and turns them into ActiveRecord DB rows. I’m converting images on a filesystem into blobs in a database. class ImageFile \< ActiveRecord::Base class \<\< self def import\_from\_hash(has…

---

## [Undefined Method confusion - Ruby Newbie (I know it rhymes,](https://www.ruby-forum.com/t/undefined-method-confusion-ruby-newbie-i-know-it-rhymes/109681)

<div class="topic-metadata">

**Author:** [@Kaldrenon](https://www.ruby-forum.com/u/Kaldrenon)\
**Replies:** 3\
**Last updated:** [July 17, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/undefined-method-confusion-ruby-newbie-i-know-it-rhymes/109681 "2007-07-17T21:42:22Z")

</div>

Hi all. I recently got into challenging myself with some of the tasks over at Project Euler (www.projecteuler.net), and while working on the solution for one of them (# 14) I came across a Ruby problem. Now, I’m pret…

---

## [C library extension question](https://www.ruby-forum.com/t/c-library-extension-question/109559)

<div class="topic-metadata">

**Author:** [@oliver](https://www.ruby-forum.com/u/oliver)\
**Replies:** 10\
**Last updated:** [July 17, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/c-library-extension-question/109559 "2007-07-17T20:17:02Z")

</div>

hi, folks - I am working on a ruby extension for a C library, and having difficulty of figuring out how to deal with this structure and wrapping it nicely in Ruby. it is a command dispatch structure, where you supply…

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

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