# Ruby

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

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

---

## [Displaying images from database in rails](https://www.ruby-forum.com/t/displaying-images-from-database-in-rails/182218)

<div class="topic-metadata">

**Author:** [@atheeq](https://www.ruby-forum.com/u/atheeq)\
**Replies:** 0\
**Last updated:** [January 25, 2010, 11:07am UTC](https://www.ruby-forum.com/t/displaying-images-from-database-in-rails/182218 "2010-01-25T11:07:59Z")

</div>

Hello, Can anyone tell me how to display images which are already stored in database? I have a table in which one column stores the url of the image like usrimg/xxx.gif. How to display this image in view? Thanks in …

---

## [\[Bug:1.9\] PTY.check is broken](https://www.ruby-forum.com/t/bug-1-9-pty-check-is-broken/182212)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 2\
**Last updated:** [January 25, 2010, 9:47am UTC](https://www.ruby-forum.com/t/bug-1-9-pty-check-is-broken/182212 "2010-01-25T09:47:38Z")

</div>

e$B$J$+$@$G$9!#e(B PTY.checke$B$,$$$m$$$m$H2u$l$F$$$k$h$&$J5$$,$7$^$9!#e(B r20298e$B$K$h$k$He(B PTY.check(pid) to poll program termination. e$B$He(B e$B$$$&$3$H$J$N$K=\*N;$^$GBT$AB3$1$ke(B e$B%a%=%C%IK\\BN$J$N$Ke(Bint…

---

## [FYI Code Review: rackupdate4](https://www.ruby-forum.com/t/fyi-code-review-rackupdate4/182210)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 0\
**Last updated:** [January 25, 2010, 8:50am UTC](https://www.ruby-forum.com/t/fyi-code-review-rackupdate4/182210 "2010-01-25T08:50:15Z")

</div>

tfpt unshelve /shelveset:“rackupdate4;REDMOND\\jimmysch” Note: the diff has been truncated of adding a Rails example and a bunch of gems (see below). Fixes for running rack-based applications Ruby changes: Put ESPI…

---

## [Code Review: dash\_s](https://www.ruby-forum.com/t/code-review-dash-s/181734)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 3\
**Last updated:** [January 25, 2010, 7:37am UTC](https://www.ruby-forum.com/t/code-review-dash-s/181734 "2010-01-25T07:37:40Z")

</div>

\-S finds the file being run on the environment’s PATH, rather than requiring the full path to be provided. Adds the -S command-line option (for example: ir -S irb) http://github.com/jschementi/ironruby/commit/135d5e57…

---

## [Invoking Ruby 1.9.1 interpreter within C, on OS X gcc](https://www.ruby-forum.com/t/invoking-ruby-1-9-1-interpreter-within-c-on-os-x-gcc/182193)

<div class="topic-metadata">

**Author:** [@pozza](https://www.ruby-forum.com/u/pozza)\
**Replies:** 2\
**Last updated:** [January 25, 2010, 6:36am UTC](https://www.ruby-forum.com/t/invoking-ruby-1-9-1-interpreter-within-c-on-os-x-gcc/182193 "2010-01-25T06:36:50Z")

</div>

As part of a project, I’m trying to set up a system that can run Ruby scripts (with C functionality) from C. I did this rather easily on 1.8.7 Ruby, but this version is built into my version of SnowLeopard, so it’s as…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/182201)

<div class="topic-metadata">

**Author:** [@de\_Leon\_Garza\_Juan\_S](https://www.ruby-forum.com/u/de_Leon_Garza_Juan_S)\
**Replies:** 0\
**Last updated:** [January 25, 2010, 5:17am UTC](https://www.ruby-forum.com/t/no-subject/182201 "2010-01-25T05:17:14Z")

</div>

unsubscribe

---

## [Installing Ruby 1.9.1 on Snow Leopard](https://www.ruby-forum.com/t/installing-ruby-1-9-1-on-snow-leopard/180219)

<div class="topic-metadata">

**Author:** [@mac20](https://www.ruby-forum.com/u/mac20)\
**Replies:** 2\
**Last updated:** [January 25, 2010, 3:56am UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-on-snow-leopard/180219 "2010-01-25T03:56:29Z")

</div>

Hello, I’m trying to install Ruby 1.9.1 alongside 1.8.7 on Snow Leopard. I’m following the instructions here http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard/ but here’s where it’s failing: M…

---

## [\[Bug #2632\] Windows $B$G$NL$FI$N$"$k%=%1%C%H$N%/%m!\<%:8e$NFI$\_\<h$j(B](https://www.ruby-forum.com/t/bug-2632-windows-b-g-nl-fi-n-k-1-c-h-n-m-8e-nfi-h-j-b/182113)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 1\
**Last updated:** [January 25, 2010, 2:31am UTC](https://www.ruby-forum.com/t/bug-2632-windows-b-g-nl-fi-n-k-1-c-h-n-m-8e-nfi-h-j-b/182113 "2010-01-25T02:31:02Z")

</div>

Bug #2632: Windows e$B$G$NL$FI$N$"$k%=%1%C%H$N%/%m!\<%:8e$NFI$\_\<h$je(B http://redmine.ruby-lang.org/issues/show/2632 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$BC4Ev\<Te(B: Usaku NAKAMURA, e$B%+…

---

## [SEGV on zipruby with irb](https://www.ruby-forum.com/t/segv-on-zipruby-with-irb/181954)

<div class="topic-metadata">

**Author:** [@Nobuhiro\_IMAI](https://www.ruby-forum.com/u/Nobuhiro_IMAI)\
**Replies:** 1\
**Last updated:** [January 25, 2010, 12:57am UTC](https://www.ruby-forum.com/t/segv-on-zipruby-with-irb/181954 "2010-01-25T00:57:59Z")

</div>

e$B$$$^$$$G$9!#e(B zipruby\[1\] e$B$H$$$&e(B gem e$B$r;H$C$F$$$k$N$G$9$,!"0J2\<$N$h$&$J%9%/%j%W%H$re(B irb e$B$G\<B9T$9$k$He(B SEGV e$B$7$^$9!#e(B http://zipruby.rubyforge.org/ e$B$Ne(B 0.3.2 e$B$G$9!#e(B e$B4D6-$O!"e…

---

## [Ruby vs Ruby vs Python vs Python](https://www.ruby-forum.com/t/ruby-vs-ruby-vs-python-vs-python/182198)

<div class="topic-metadata">

**Author:** [@triplem](https://www.ruby-forum.com/u/triplem)\
**Replies:** 0\
**Last updated:** [January 24, 2010, 11:42pm UTC](https://www.ruby-forum.com/t/ruby-vs-ruby-vs-python-vs-python/182198 "2010-01-24T23:42:56Z")

</div>

A curious benchmarks that compares the latest versions: http://mastrodonato.info/index.php/2010/01/ruby-vs-ruby-vs-python-vs-python-2/?lang=en

---

## [Looking for gem for text based screen IO](https://www.ruby-forum.com/t/looking-for-gem-for-text-based-screen-io/182175)

<div class="topic-metadata">

**Author:** [@dale8458](https://www.ruby-forum.com/u/dale8458)\
**Replies:** 2\
**Last updated:** [January 24, 2010, 10:47pm UTC](https://www.ruby-forum.com/t/looking-for-gem-for-text-based-screen-io/182175 "2010-01-24T22:47:29Z")

</div>

Hi, I wanted to control the output, position of output to the console. Like old school text based application. I have a utility that is runing through many item and would like to show a status instead of puts() -da…

---

## [\[Bug #1872\] \[ruby\_1\_8\] Kernel#system doesn't work in forked process](https://www.ruby-forum.com/t/bug-1872-ruby-1-8-kernel-system-doesnt-work-in-forked-process/173137)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [January 24, 2010, 8:41pm UTC](https://www.ruby-forum.com/t/bug-1872-ruby-1-8-kernel-system-doesnt-work-in-forked-process/173137 "2010-01-24T20:41:39Z")

</div>

Bug #1872: \[ruby\_1\_8\] Kernel#system doesn’t work in forked process http://redmine.ruby-lang.org/issues/show/1872 e$B5/I\<\<Te(B: Hidetoshi Nagai e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: High e$B%+%F%4%je(B: core, Target v…

---

## [Writing proper getter in a Ruby way](https://www.ruby-forum.com/t/writing-proper-getter-in-a-ruby-way/182164)

<div class="topic-metadata">

**Author:** [@benoitdinocourt](https://www.ruby-forum.com/u/benoitdinocourt)\
**Replies:** 8\
**Last updated:** [January 24, 2010, 8:03pm UTC](https://www.ruby-forum.com/t/writing-proper-getter-in-a-ruby-way/182164 "2010-01-24T20:03:01Z")

</div>

Hi Rubyists ! While writing a ‘getter’(it actually does more than just getting a @var’s value) method, I was wondering what was the most ruby-way to write it. The ‘issue’ is if the @var is not initialized in constru…

---

## [Mocking behavior between clr types](https://www.ruby-forum.com/t/mocking-behavior-between-clr-types/182190)

<div class="topic-metadata">

**Author:** [@andrew\_Wilson](https://www.ruby-forum.com/u/andrew_Wilson)\
**Replies:** 1\
**Last updated:** [January 24, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/mocking-behavior-between-clr-types/182190 "2010-01-24T19:42:31Z")

</div>

As I have been working more and more with testing C# via IronRuby & Rspec, I have found myself wanting to use more and more of the rspec framework for testing. I have also found problems that I am not sure how to wo…

---

## [Google appengine best way to get rails running](https://www.ruby-forum.com/t/google-appengine-best-way-to-get-rails-running/181986)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [January 24, 2010, 6:40pm UTC](https://www.ruby-forum.com/t/google-appengine-best-way-to-get-rails-running/181986 "2010-01-24T18:40:28Z")

</div>

anyone has experience to get rails running on google appengine - as ORM I will use datamapper since there is dm-appegine-adapter available. using warbler and add everything I need. or is it better to use Google Code…

---

## [Test for OS name from inside ruby script](https://www.ruby-forum.com/t/test-for-os-name-from-inside-ruby-script/182138)

<div class="topic-metadata">

**Author:** [@dale8458](https://www.ruby-forum.com/u/dale8458)\
**Replies:** 4\
**Last updated:** [January 24, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/test-for-os-name-from-inside-ruby-script/182138 "2010-01-24T16:39:55Z")

</div>

How do I test in my scripts for the OS type? So I can conditionally run different code…? thanks

---

## [Re: how to define \[\]=](https://www.ruby-forum.com/t/re-how-to-define/182149)

<div class="topic-metadata">

**Author:** [@hagbard](https://www.ruby-forum.com/u/hagbard)\
**Replies:** 6\
**Last updated:** [January 24, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/re-how-to-define/182149 "2010-01-24T12:53:25Z")

</div>

But how do we define the set method \`\[\]=’? Just define it. def \[\]=(i, value) @ary\[i\] = value end

---

## [Gets and ARGV?](https://www.ruby-forum.com/t/gets-and-argv/182179)

<div class="topic-metadata">

**Author:** [@thinkwritemute](https://www.ruby-forum.com/u/thinkwritemute)\
**Replies:** 1\
**Last updated:** [January 24, 2010, 8:02am UTC](https://www.ruby-forum.com/t/gets-and-argv/182179 "2010-01-24T08:02:35Z")

</div>

Code \> option = input\[0\] values = input\[1,input.length\] print '#Message: ’ i = gets Active \> thinkwritemute@thinkwritemute-netbook:~/Dropbox/Public/Repositories/ruby/twt$ ruby twt.rb post #Message: twt.rb:181:in g…

---

## [Loofah 0.4.2 Released](https://www.ruby-forum.com/t/loofah-0-4-2-released/182177)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 0\
**Last updated:** [January 24, 2010, 5:06am UTC](https://www.ruby-forum.com/t/loofah-0-4-2-released/182177 "2010-01-24T05:06:27Z")

</div>

loofah version 0.4.2 has been released! http://loofah.rubyforge.org http://rubyforge.org/projects/loofah http://github.com/flavorjones/loofah Loofah is a general library for manipulating HTML/XML documents and fragme…

---

## [Use Ruby to make a MTU sweep utility (Ping)](https://www.ruby-forum.com/t/use-ruby-to-make-a-mtu-sweep-utility-ping/182133)

<div class="topic-metadata">

**Author:** [@dale8458](https://www.ruby-forum.com/u/dale8458)\
**Replies:** 9\
**Last updated:** [January 24, 2010, 3:13am UTC](https://www.ruby-forum.com/t/use-ruby-to-make-a-mtu-sweep-utility-ping/182133 "2010-01-24T03:13:49Z")

</div>

Hi I’ve had a request to make a utility (I want to use Ruby) that does a MTU sweep looking for black holes in routes. So I need a library or a way to run ping in both a OS X, Linux and Windows environment. The util…

---

## [Rules for constant lookup](https://www.ruby-forum.com/t/rules-for-constant-lookup/182170)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [January 23, 2010, 9:46pm UTC](https://www.ruby-forum.com/t/rules-for-constant-lookup/182170 "2010-01-23T21:46:09Z")

</div>

Can somebody point me to an accurate list of the rules for constant lookup? I’ve just been caught out by the following. ==\> works.rb \<== module Foo class Bar; end class Baz def initialize @bar = Bar.new end end …

---

## [Search datetime column for all records that start at 11:00](https://www.ruby-forum.com/t/search-datetime-column-for-all-records-that-start-at-11-00/182135)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 4\
**Last updated:** [January 23, 2010, 5:47pm UTC](https://www.ruby-forum.com/t/search-datetime-column-for-all-records-that-start-at-11-00/182135 "2010-01-23T17:47:51Z")

</div>

i have to count how many records are in a database that have a start time of 11:00 for an entire year. the problem is, i can’t seem to find out how to coax rails into ignoring the date to just search for a time.

---

## [Urls from gsub not correct](https://www.ruby-forum.com/t/urls-from-gsub-not-correct/182161)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 1\
**Last updated:** [January 23, 2010, 5:45pm UTC](https://www.ruby-forum.com/t/urls-from-gsub-not-correct/182161 "2010-01-23T17:45:50Z")

</div>

i have some problems when i try to check urls after get them from gsub method. ex from the console: (‘http://ale.it’ =~ URI::regexp).nil?.to\_s =\> “false” and it works fine but if i launch this: “http://ale.it”.gsub…

---

## [Get time object from the web?](https://www.ruby-forum.com/t/get-time-object-from-the-web/182066)

<div class="topic-metadata">

**Author:** [@omegas7](https://www.ruby-forum.com/u/omegas7)\
**Replies:** 8\
**Last updated:** [January 23, 2010, 4:12pm UTC](https://www.ruby-forum.com/t/get-time-object-from-the-web/182066 "2010-01-23T16:12:48Z")

</div>

Hello there. I was wondering if, it was possible to connect to the internet and create a time object (Time.new) from a web clock?

---

## [How to define \[\]=](https://www.ruby-forum.com/t/how-to-define/182148)

<div class="topic-metadata">

**Author:** [@1qwerty](https://www.ruby-forum.com/u/1qwerty)\
**Replies:** 0\
**Last updated:** [January 23, 2010, 3:13pm UTC](https://www.ruby-forum.com/t/how-to-define/182148 "2010-01-23T15:13:29Z")

</div>

Dear all, We can define get method \`\[\]’ as: def @ary\[i\] end But how do we define the set method \`\[\]=’? Thank you!

---

## [Optimize startup initialization](https://www.ruby-forum.com/t/optimize-startup-initialization/182045)

<div class="topic-metadata">

**Author:** [@rostislav](https://www.ruby-forum.com/u/rostislav)\
**Replies:** 6\
**Last updated:** [January 23, 2010, 2:23pm UTC](https://www.ruby-forum.com/t/optimize-startup-initialization/182045 "2010-01-23T14:23:25Z")

</div>

Hello, I’ve been successfully using JRuby from within Java for some time and now I’m trying to improve the startup time. The code is available as an open source project called LESS Engine \[1\] and wraps a cool Ruby lib…

---

## [Sorting Method](https://www.ruby-forum.com/t/sorting-method/182093)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 4\
**Last updated:** [January 23, 2010, 9:17am UTC](https://www.ruby-forum.com/t/sorting-method/182093 "2010-01-23T09:17:20Z")

</div>

Hi there, I am working my way through Chris P.'s Learn to Program, and am currently working on a sorting method (to ask the user for a list of words and then print them alphabetized.) He suggests that we write this p…

---

## [Why is rails/ruby automatically rounding to whole numbers](https://www.ruby-forum.com/t/why-is-rails-ruby-automatically-rounding-to-whole-numbers/182132)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 5\
**Last updated:** [January 23, 2010, 5:51am UTC](https://www.ruby-forum.com/t/why-is-rails-ruby-automatically-rounding-to-whole-numbers/182132 "2010-01-23T05:51:57Z")

</div>

@wtf= 751 / 750 returns 1 in the view @wtf= 3 / 750 returns 0 in the view @wtf= 749 / 750 returns 0 in the view. can somebody explain what’s going on here. i’m just trying to calculate percents.

---

## [Wxruby rdocs](https://www.ruby-forum.com/t/wxruby-rdocs/182136)

<div class="topic-metadata">

**Author:** [@tutiplain](https://www.ruby-forum.com/u/tutiplain)\
**Replies:** 0\
**Last updated:** [January 23, 2010, 5:25am UTC](https://www.ruby-forum.com/t/wxruby-rdocs/182136 "2010-01-23T05:25:27Z")

</div>

Hi all, I want to learn to use wxRuby, but when I do gem install, the rdocs are not installed. I can always review the API docs on the rubyforge site, but I’d like to have a local copy, in case I don’t have an intern…

---

## [Parse a String](https://www.ruby-forum.com/t/parse-a-string/182090)

<div class="topic-metadata">

**Author:** [@seanwarburton](https://www.ruby-forum.com/u/seanwarburton)\
**Replies:** 4\
**Last updated:** [January 23, 2010, 3:23am UTC](https://www.ruby-forum.com/t/parse-a-string/182090 "2010-01-23T03:23:54Z")

</div>

Hello, I wonder if someone would be able to help. Through necessity I’m learning Ruby and trying to write my own script and while I am getting there and grasping things more, I’m still on first rung of the ladder and…

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

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