# Ruby

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

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

---

## [Using Ruby to get data from an Access Database](https://www.ruby-forum.com/t/using-ruby-to-get-data-from-an-access-database/105900)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 4\
**Last updated:** [June 5, 2007, 1:26am UTC](https://www.ruby-forum.com/t/using-ruby-to-get-data-from-an-access-database/105900 "2007-06-05T01:26:19Z")

</div>

Hi guys, I’m very new to this Ruby language. I only have basic experience of creating Intranet applications using ASP and an MS Access Database. I’m trying to adapt some code from the www.Alexa.com 's example code but …

---

## [Sequel: Get latest record of multiple](https://www.ruby-forum.com/t/sequel-get-latest-record-of-multiple/105874)

<div class="topic-metadata">

**Author:** [@Florian\_ASSSSmann](https://www.ruby-forum.com/u/Florian_ASSSSmann)\
**Replies:** 2\
**Last updated:** [June 5, 2007, 12:06am UTC](https://www.ruby-forum.com/t/sequel-get-latest-record-of-multiple/105874 "2007-06-05T00:06:49Z")

</div>

Hi there, first of all I’d like to say that Sequel seems very promising, thank you Sharon. I’m currently writing a threaded daemon and I can’t figure out how to build this SQL String. I have an array of category ids …

---

## [Link\_to query mysql for list](https://www.ruby-forum.com/t/link-to-query-mysql-for-list/105948)

<div class="topic-metadata">

**Author:** [@jerryjj](https://www.ruby-forum.com/u/jerryjj)\
**Replies:** 2\
**Last updated:** [June 4, 2007, 11:28pm UTC](https://www.ruby-forum.com/t/link-to-query-mysql-for-list/105948 "2007-06-04T23:28:44Z")

</div>

I have a web app that I want to make a link. I have a link\_to that will show the entire list of an inventory table, but I want another link that will select only items of a certain name. Here is my show all link \<%= …

---

## [Help needed: Dynamically create a Proc from a String and eva](https://www.ruby-forum.com/t/help-needed-dynamically-create-a-proc-from-a-string-and-eva/105944)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 6\
**Last updated:** [June 4, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/help-needed-dynamically-create-a-proc-from-a-string-and-eva/105944 "2007-06-04T23:05:41Z")

</div>

Dear all, I need help in dynamically creating a Proc from a String like, say, a='f(x)=c\*exp(x/k)', (I need to do this many times for many different formulas) which I want to use Ruby to calculate as a function of x,…

---

## [RubyCocoa 0.11.1](https://www.ruby-forum.com/t/rubycocoa-0-11-1/105951)

<div class="topic-metadata">

**Author:** [@Laurent\_S](https://www.ruby-forum.com/u/Laurent_S)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 10:15pm UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-1/105951 "2007-06-04T22:15:34Z")

</div>

Hi, I am honored to announce the immediate release of RubyCocoa 0.11.1. RubyCocoa is a Mac OS X framework that allows Cocoa programming in the object-oriented scripting language Ruby. In other words, it is a bridge t…

---

## [Newcocoa, command not found?](https://www.ruby-forum.com/t/newcocoa-command-not-found/105896)

<div class="topic-metadata">

**Author:** [@anne001](https://www.ruby-forum.com/u/anne001)\
**Replies:** 3\
**Last updated:** [June 4, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/newcocoa-command-not-found/105896 "2007-06-04T22:07:33Z")

</div>

I installed new cocoa from gem: sudo gem install newcocoa Successfully installed newcocoa-0.0.4 Installing ri documentation for newcocoa-0.0.4… Installing RDoc documentation for newcocoa-0.0.4… But I can’t run new…

---

## [Sleeping between 1e-2 and 1e-6s](https://www.ruby-forum.com/t/sleeping-between-1e-2-and-1e-6s/105923)

<div class="topic-metadata">

**Author:** [@apeiros](https://www.ruby-forum.com/u/apeiros)\
**Replies:** 2\
**Last updated:** [June 4, 2007, 10:03pm UTC](https://www.ruby-forum.com/t/sleeping-between-1e-2-and-1e-6s/105923 "2007-06-04T22:03:04Z")

</div>

I noticed that ruby uses a different way to sleep with values \>1e-6s. I added my observations below. My question is now: what is the suggested way to sleep e.g. 0.001s? 10000.times { sleep(0.0000001) }? Cant’ really b…

---

## [Getting ruby v1.8.6 on Mac OS X - what's the easiest way?](https://www.ruby-forum.com/t/getting-ruby-v1-8-6-on-mac-os-x-whats-the-easiest-way/105859)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 8\
**Last updated:** [June 4, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/getting-ruby-v1-8-6-on-mac-os-x-whats-the-easiest-way/105859 "2007-06-04T21:23:09Z")

</div>

Hi, I’m interested in getting my Macbook Ruby installation up to v1.8.6. What’s the easiest way? I already have Locomotive, but I was thinking of trying to avoid using this and going with a base Ruby installation s…

---

## [South East Michigan Ruby Brigade Meeting - TODAY](https://www.ruby-forum.com/t/south-east-michigan-ruby-brigade-meeting-today/105946)

<div class="topic-metadata">

**Author:** [@Winston\_T](https://www.ruby-forum.com/u/Winston_T)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/south-east-michigan-ruby-brigade-meeting-today/105946 "2007-06-04T21:22:08Z")

</div>

Date: Today → Monday, 4 June 2007 Time: 7:00-8:30pm Location: 1670 CSE (http://cma.hurleyhome.com/SEMI%20Ruby%20Map.pdf) (if you are not familiar with campus don’t be intimidated, ask on the mailing list (http://list…

---

## [Missoula Ruby & RoR Meeting](https://www.ruby-forum.com/t/missoula-ruby-ror-meeting/105931)

<div class="topic-metadata">

**Author:** [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 7:53pm UTC](https://www.ruby-forum.com/t/missoula-ruby-ror-meeting/105931 "2007-06-04T19:53:22Z")

</div>

It’s a new month, and that means another meeting of the Missoula Ruby and Ruby on Rails Users Group. As usual, we’ll gather at a table in the back half of Sean Kelly’s, tomorrow June 5th, at 6:00pm. http://groups.goo…

---

## [How to capture the output of system("")?](https://www.ruby-forum.com/t/how-to-capture-the-output-of-system/105928)

<div class="topic-metadata">

**Author:** [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Replies:** 4\
**Last updated:** [June 4, 2007, 7:51pm UTC](https://www.ruby-forum.com/t/how-to-capture-the-output-of-system/105928 "2007-06-04T19:51:21Z")

</div>

All, When I can system("…") in ruby, I got either true or false returned, but how do I capture the information that being printed out in console when the cmd is being executed? Thanks

---

## [Image upload](https://www.ruby-forum.com/t/image-upload/105844)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 2\
**Last updated:** [June 4, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/image-upload/105844 "2007-06-04T19:18:14Z")

</div>

Hello, \*I am looking for the way to upload a image file using file system in rails. Any idea how to do? Nilez.

---

## [Solution to 126](https://www.ruby-forum.com/t/solution-to-126/105925)

<div class="topic-metadata">

**Author:** [@Justin\_E](https://www.ruby-forum.com/u/Justin_E)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/solution-to-126/105925 "2007-06-04T18:40:07Z")

</div>

Hello, Here is my solution. I made the assumption that the interviewer has a terminal handy and I have 5-10 minutes to crank this out. If I was just writing it down on paper, I made a note of a couple things that I go…

---

## [Numeric locale](https://www.ruby-forum.com/t/numeric-locale/105904)

<div class="topic-metadata">

**Author:** [@Bertram\_S](https://www.ruby-forum.com/u/Bertram_S)\
**Replies:** 2\
**Last updated:** [June 4, 2007, 6:07pm UTC](https://www.ruby-forum.com/t/numeric-locale/105904 "2007-06-04T18:07:03Z")

</div>

Hi, the German decimal separator is “,”. So pi will be represented by “3,1415” rather than “3.1415”. As far as I know this behaviour is controlled by the LC\_NUMERIC environment variable. Now, I notice the following …

---

## [How to check if a string is a integer?](https://www.ruby-forum.com/t/how-to-check-if-a-string-is-a-integer/105909)

<div class="topic-metadata">

**Author:** [@w\_wg](https://www.ruby-forum.com/u/w_wg)\
**Replies:** 10\
**Last updated:** [June 4, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/how-to-check-if-a-string-is-a-integer/105909 "2007-06-04T18:06:03Z")

</div>

How to check if a string is a integer ? After seached in google, I can’t find any information. All ISINTEGER function is about Javascript. Thank you.

---

## [Fwd: Ruby Quiz #126 Submission](https://www.ruby-forum.com/t/fwd-ruby-quiz-126-submission/229096)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/fwd-ruby-quiz-126-submission/229096 "2007-06-04T18:03:01Z")

</div>

Begin forwarded message:

---

## [Throw in Fiber causes loop](https://www.ruby-forum.com/t/throw-in-fiber-causes-loop/105915)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/throw-in-fiber-causes-loop/105915 "2007-06-04T17:08:55Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B Fiber e$B$N%V%m%C%/$NCf$G%-%c%C%A$5$l$J$$e(B throw e$B$r8F$V$H!"e(B e$BL58B%k!\<%We(B e$B$K4Y$j$^$9!#e(B $ cat f2.rb Fiber.new do throw :a end.yield $ ruby-1.9 -v f2.rb ruby…

---

## [No way of looking for a regrexp match starting from a partic](https://www.ruby-forum.com/t/no-way-of-looking-for-a-regrexp-match-starting-from-a-partic/105810)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 25\
**Last updated:** [June 4, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/no-way-of-looking-for-a-regrexp-match-starting-from-a-partic/105810 "2007-06-04T14:51:35Z")

</div>

I’m probably just missing something obvious, but I haven’t found a way to match a regular expression against only part of a string, in particular only past a certain point of a string, as a way of finding successive m…

---

## [Gem:Module (NoMethodError)](https://www.ruby-forum.com/t/gem-module-nomethoderror/105855)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 2\
**Last updated:** [June 4, 2007, 2:35pm UTC](https://www.ruby-forum.com/t/gem-module-nomethoderror/105855 "2007-06-04T14:35:32Z")

</div>

I have this problem win Rubygem I don’t now what to do rubygems-0.9.4 =============================================================================== /usr/lib/ruby/site\_ruby/1.8/rubygems.rb:84:Warning: require\_gem is …

---

## [Continuation in fiber dumps core](https://www.ruby-forum.com/t/continuation-in-fiber-dumps-core/105899)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/continuation-in-fiber-dumps-core/105899 "2007-06-04T14:18:30Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B thunk e$B$,0J2\<$N%3!\<%I$Ge(B segv e$B$7$^$9!#e(B c = nil f = Fiber.new do callcc {|c2| c = c2 } end f.yield c.call

---

## [Fastthread 1.0](https://www.ruby-forum.com/t/fastthread-1-0/89403)

<div class="topic-metadata">

**Author:** [@MenTaLguY](https://www.ruby-forum.com/u/MenTaLguY)\
**Replies:** 12\
**Last updated:** [June 4, 2007, 11:30am UTC](https://www.ruby-forum.com/t/fastthread-1-0/89403 "2007-06-04T11:30:08Z")

</div>

Well, just when I thought I was out of the fastthread business… Okay, in brief: fastthread is a Ruby extension which re-implements the primitives in Ruby’s thread.rb in C. It was merged into 1.8.6, replacing the old …

---

## [Simple markup to html](https://www.ruby-forum.com/t/simple-markup-to-html/105574)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 1\
**Last updated:** [June 4, 2007, 8:30am UTC](https://www.ruby-forum.com/t/simple-markup-to-html/105574 "2007-06-04T08:30:45Z")

</div>

trying to convert simple markup to html, works fine with the commands below but hyperlinks (e.g. http:// or mailto:) in the markup aren’t transferred to html (e.g. ). Anything missing? require ‘rdoc/markup/simple\_mar…

---

## [Re: FizzBuzz (#126)](https://www.ruby-forum.com/t/re-fizzbuzz-126/105869)

<div class="topic-metadata">

**Author:** [@Federico\_ZagarzazSS](https://www.ruby-forum.com/u/Federico_ZagarzazSS)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 5:35am UTC](https://www.ruby-forum.com/t/re-fizzbuzz-126/105869 "2007-06-04T05:35:32Z")

</div>

Finally a quiz for newbies like me. :slight\_smile: ARGV\[0\].to\_i.upto(ARGV\[1\].to\_i) do |x| puts case \[15,5,3\].find {|i| x % i == 0} when 15 : ‘FizzBuzz’ when 5 : ‘Buzz’ when 3 : ‘Fizz’ when nil: x end end Thank…

---

## [Update scaffolding form field](https://www.ruby-forum.com/t/update-scaffolding-form-field/105866)

<div class="topic-metadata">

**Author:** [@dafritz](https://www.ruby-forum.com/u/dafritz)\
**Replies:** 0\
**Last updated:** [June 4, 2007, 4:21am UTC](https://www.ruby-forum.com/t/update-scaffolding-form-field/105866 "2007-06-04T04:21:28Z")

</div>

This may be a basic question, but i have an “image” field in a “news” table, and have a form that uploads the image. Following the upload, the “new” action is called in the rails scaffolding so i can add the rest of t…

---

## [Segv when Fiber#pass twice](https://www.ruby-forum.com/t/segv-when-fiber-pass-twice/105715)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 1\
**Last updated:** [June 4, 2007, 3:52am UTC](https://www.ruby-forum.com/t/segv-when-fiber-pass-twice/105715 "2007-06-04T03:52:25Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B trunk e$B$G!"=\*N;$7$?e(B Fiber e$B$Ke(B pass e$B$r8F$V$He(B segv e$B$7$^$9!#e(B $ cat f.rb fbr = Fiber.new do end fbr.pass fbr.pass $ ruby-1.9 -v f.rb ruby 1.9.0 (2007-06-…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229138)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 3, 2007, 10:51pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229138 "2007-06-03T22:51:08Z")

</div>

Begin forwarded message:

---

## [Delete in Array (if exist) and count](https://www.ruby-forum.com/t/delete-in-array-if-exist-and-count/105832)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 5\
**Last updated:** [June 3, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/delete-in-array-if-exist-and-count/105832 "2007-06-03T20:59:50Z")

</div>

I am trying to delete an element from an array if it exists and count the number of item afterwards I wrote anArray = \[1,2,3,4,5,6,7,8,9\] anArray.size =\> 9 anArray.map {|e| e if e != 4}.compact =\> \[1, 2, 3, 5, 6, …

---

## [Re: FizzBuzz (#126)](https://www.ruby-forum.com/t/re-fizzbuzz-126/105824)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 3, 2007, 8:18pm UTC](https://www.ruby-forum.com/t/re-fizzbuzz-126/105824 "2007-06-03T20:18:43Z")

</div>

My solution, which is probably awkward in its use of method mangling: class Fixnum @@old\_to\_s = 1.method(:to\_s).unbind def to\_s s = ((self % 3 == 0 ? “Fizz” : “”) + (self % 5 == 0 ? “Buzz” : “”)) s.empty? ? @@old\_t…

---

## [Help with moving files](https://www.ruby-forum.com/t/help-with-moving-files/105748)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 5\
**Last updated:** [June 3, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/help-with-moving-files/105748 "2007-06-03T19:58:06Z")

</div>

I am in need of some help with moving some files. I have some folders that are inside an images directory, and inside each of the these directories there are images that I want to move to another folder so that all th…

---

## [FizzBuzz (#126) \[SOLUTION\]](https://www.ruby-forum.com/t/fizzbuzz-126-solution/105848)

<div class="topic-metadata">

**Author:** [@doug\_meyer](https://www.ruby-forum.com/u/doug_meyer)\
**Replies:** 0\
**Last updated:** [June 3, 2007, 7:32pm UTC](https://www.ruby-forum.com/t/fizzbuzz-126-solution/105848 "2007-06-03T19:32:38Z")

</div>

This is one of those quizzes that is so easy, you have to find some ridiculous way of solving it :smiley: First off, there is the correct way of coding: clear, concise, and actually works #!/usr/bin/env ruby Douglas…

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

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