# Ruby

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

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

---

## [Corresponding C-method for setting and changing a local or global variable](https://www.ruby-forum.com/t/corresponding-c-method-for-setting-and-changing-a-local-or-global-variable/121084)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [November 25, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/corresponding-c-method-for-setting-and-changing-a-local-or-global-variable/121084 "2007-11-25T22:52:50Z")

</div>

its me again, still having trouble with the c-core. im trying to find the c-method(s) which is responsible if a local or global variable is set. example: class X $globvar = “hey” \<- setting/instanciation of a globa…

---

## [Searching for the C-Method which is invoked by any (ruby) methodcall](https://www.ruby-forum.com/t/searching-for-the-c-method-which-is-invoked-by-any-ruby-methodcall/121083)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 25, 2007, 10:51pm UTC](https://www.ruby-forum.com/t/searching-for-the-c-method-which-is-invoked-by-any-ruby-methodcall/121083 "2007-11-25T22:51:04Z")

</div>

hey guys. I’m searching for days for the C-method(s) which is/are invoked if a ruby method call takes place. Example class X def hello() p “hello” end end ix = X.new \<- methodcall new x.hello \<- methodcall hell…

---

## [Entering nil string value through gets](https://www.ruby-forum.com/t/entering-nil-string-value-through-gets/121227)

<div class="topic-metadata">

**Author:** [@pie-social](https://www.ruby-forum.com/u/pie-social)\
**Replies:** 5\
**Last updated:** [November 25, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/entering-nil-string-value-through-gets/121227 "2007-11-25T21:42:49Z")

</div>

when i enter nil for gets, it is not comparing with another string having nil value. tried gets.chomp which also gives the same problem. any help? democrats = \[“Carter”, “Clinton”\] puts ‘x1’ republicans = \[“Ford”, …

---

## [My first rails app](https://www.ruby-forum.com/t/my-first-rails-app/121176)

<div class="topic-metadata">

**Author:** [@visage](https://www.ruby-forum.com/u/visage)\
**Replies:** 1\
**Last updated:** [November 25, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/my-first-rails-app/121176 "2007-11-25T20:50:59Z")

</div>

Hi, all, I’m learning rails, and I’ve started blogging about the site I’m building. I had some initial troubles, but I’ve got the first story up. It is pretty long and very rambling, but, if anyone wants to have a st…

---

## [Checking File for a line](https://www.ruby-forum.com/t/checking-file-for-a-line/121065)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 8\
**Last updated:** [November 25, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/checking-file-for-a-line/121065 "2007-11-25T20:44:38Z")

</div>

Need to check a file for a line Lets say “this is an example” I am going to just take every line into an array and then have a For loop to check the array for that line. Im pretty sure this will work but is there any…

---

## [Active record quetion](https://www.ruby-forum.com/t/active-record-quetion/121223)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 2\
**Last updated:** [November 25, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/active-record-quetion/121223 "2007-11-25T20:05:50Z")

</div>

here is my issue. i want to get the id of of the record extracted here. it however gives me 37832400 instead of 9. i am not sure why. t=Trade.find\_by\_sql(“select \* from trades where tradestatus=‘O’ and symbol\_al ia…

---

## [Ruby to Perl translation](https://www.ruby-forum.com/t/ruby-to-perl-translation/121045)

<div class="topic-metadata">

**Author:** [@jmaziarz](https://www.ruby-forum.com/u/jmaziarz)\
**Replies:** 11\
**Last updated:** [November 25, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/ruby-to-perl-translation/121045 "2007-11-25T19:13:01Z")

</div>

I love the flexibility of writing scripts in Ruby but my work doesn’t allow me to install the Ruby interpreter on my system. Does anyone know of any tools that will translate my Ruby scripts into Perl scripts? My Ru…

---

## [Problem starting Merb 0.4.1](https://www.ruby-forum.com/t/problem-starting-merb-0-4-1/121168)

<div class="topic-metadata">

**Author:** [@schmitr3](https://www.ruby-forum.com/u/schmitr3)\
**Replies:** 2\
**Last updated:** [November 25, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/problem-starting-merb-0-4-1/121168 "2007-11-25T17:46:56Z")

</div>

Hi, I seem to be having problems getting merb 0.4.1 up and running. My platform is ubuntu (7.10) and all packages/gems are up-to-date. For reference, another project using merb 0.3.7 was working fine on the same box. …

---

## [Convert words to numbers and back?](https://www.ruby-forum.com/t/convert-words-to-numbers-and-back/121139)

<div class="topic-metadata">

**Author:** [@envygeeks](https://www.ruby-forum.com/u/envygeeks)\
**Replies:** 9\
**Last updated:** [November 25, 2007, 5:05pm UTC](https://www.ruby-forum.com/t/convert-words-to-numbers-and-back/121139 "2007-11-25T17:05:56Z")

</div>

I was wondering if somebody could give me some insight and help on how to convert words to numbers and back again. Maybe a function?

---

## [Extract consecutive lines of data](https://www.ruby-forum.com/t/extract-consecutive-lines-of-data/121179)

<div class="topic-metadata">

**Author:** [@baptiste\_AuguiSSSS](https://www.ruby-forum.com/u/baptiste_AuguiSSSS)\
**Replies:** 8\
**Last updated:** [November 25, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/extract-consecutive-lines-of-data/121179 "2007-11-25T16:47:45Z")

</div>

Hi, A basic question: how to extract several consecutive lines of numbers in a text file (example below) and assign them to some GSL::Matrix in Ruby? text file: some more text from which i would like to create th…

---

## [Win32-service 0.6.0](https://www.ruby-forum.com/t/win32-service-0-6-0/121217)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 0\
**Last updated:** [November 25, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/win32-service-0-6-0/121217 "2007-11-25T14:59:02Z")

</div>

Hi all, The Win32Utils Team is very pleased to announce the release of win32-service 0.6.0. This release features lots of changes. Note that some of the changes are not backwards compatible. See below. Special thanks…

---

## [What all have you done with Ruby?](https://www.ruby-forum.com/t/what-all-have-you-done-with-ruby/121155)

<div class="topic-metadata">

**Author:** [@sam](https://www.ruby-forum.com/u/sam)\
**Replies:** 4\
**Last updated:** [November 25, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/what-all-have-you-done-with-ruby/121155 "2007-11-25T13:20:42Z")

</div>

Being a new Ruby user, and a brand new programmer (which isn’t working out so well), I am curious as to what all everyone here is using Ruby for. I am looking for some ideas as to what kind of programs I should attem…

---

## [Ruby-oci8 1.0.0](https://www.ruby-forum.com/t/ruby-oci8-1-0-0/121214)

<div class="topic-metadata">

**Author:** [@kubo](https://www.ruby-forum.com/u/kubo)\
**Replies:** 0\
**Last updated:** [November 25, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/ruby-oci8-1-0-0/121214 "2007-11-25T12:54:23Z")

</div>

ruby-oci8 1.0.0 is released. This is a Oracle module using OCI8 API. http://rubyforge.org/projects/ruby-oci8/ This is second 1.0.0 release. I released 1.0.0 at 10:34:18 GMT. But I noticed that a bug (7 in the what’s …

---

## [Populate select with first\_name & last\_name](https://www.ruby-forum.com/t/populate-select-with-first-name-last-name/196526)

<div class="topic-metadata">

**Author:** [@daborg69](https://www.ruby-forum.com/u/daborg69)\
**Replies:** 2\
**Last updated:** [November 25, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/populate-select-with-first-name-last-name/196526 "2007-11-25T12:09:56Z")

</div>

Hey, I want to populate a select drop down form helper with FIRST NAME + LAST NAME. However, these are both in separate columns in the DB - how can I join them together? I can manage to populate it with just the fir…

---

## [Ruby installation in leopard after upgrade](https://www.ruby-forum.com/t/ruby-installation-in-leopard-after-upgrade/121207)

<div class="topic-metadata">

**Author:** [@kmeaw](https://www.ruby-forum.com/u/kmeaw)\
**Replies:** 1\
**Last updated:** [November 25, 2007, 10:28am UTC](https://www.ruby-forum.com/t/ruby-installation-in-leopard-after-upgrade/121207 "2007-11-25T10:28:47Z")

</div>

Have a good day and night! In osx 10.4 i has a ruby 1.8.4, after upgrade to 10.5 it was still 1.8.4, i change links in /usr/local/bin, then upgrade gems - everytihng was fine, but problems was: irb say: ############…

---

## [Problem getting user input](https://www.ruby-forum.com/t/problem-getting-user-input/121071)

<div class="topic-metadata">

**Author:** [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Replies:** 5\
**Last updated:** [November 25, 2007, 9:12am UTC](https://www.ruby-forum.com/t/problem-getting-user-input/121071 "2007-11-25T09:12:47Z")

</div>

I wrote a script that gets user input like this: $stdout.print "Do you want to change something else? (y/n): " $changeSE = gets.chomp if $changeSE =~ /^y/ changeSomethingElse end After the prompt is printed, the sc…

---

## [Help Regarding ASP Login Authentication popup](https://www.ruby-forum.com/t/help-regarding-asp-login-authentication-popup/121201)

<div class="topic-metadata">

**Author:** [@coolnandhu](https://www.ruby-forum.com/u/coolnandhu)\
**Replies:** 0\
**Last updated:** [November 25, 2007, 8:10am UTC](https://www.ruby-forum.com/t/help-regarding-asp-login-authentication-popup/121201 "2007-11-25T08:10:27Z")

</div>

Hi I am using ruby to enter the date automatically into web page. In this process i am came across “ASP Login Authentication popup”. In which i have to enter the “login details” using ruby program automatically. Cou…

---

## [Identification of VALUE recv](https://www.ruby-forum.com/t/identification-of-value-recv/121144)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 25, 2007, 7:35am UTC](https://www.ruby-forum.com/t/identification-of-value-recv/121144 "2007-11-25T07:35:50Z")

</div>

hey how is it possible to get the value(s) of the variable receiver in rb\_funcall? Function: VALUE rb\_funcall(VALUE recv, ID mid, int n, …) is there something like: StringValueCStr(recv) ? the thing is, I want to …

---

## [Enumerable#detect\_result?](https://www.ruby-forum.com/t/enumerable-detect-result/121180)

<div class="topic-metadata">

**Author:** [@Yossef\_M](https://www.ruby-forum.com/u/Yossef_M)\
**Replies:** 7\
**Last updated:** [November 25, 2007, 7:31am UTC](https://www.ruby-forum.com/t/enumerable-detect-result/121180 "2007-11-25T07:31:09Z")

</div>

Actual code from a recent project: # This is bunk, but I'm tired and can't think of the right way to do this # I was trying formats.detect, but that just returns the format, not the result result = nil formats.each…

---

## [Ruby lnline question](https://www.ruby-forum.com/t/ruby-lnline-question/121183)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 1\
**Last updated:** [November 25, 2007, 3:43am UTC](https://www.ruby-forum.com/t/ruby-lnline-question/121183 "2007-11-25T03:43:51Z")

</div>

Dear all, I’d like to have Ruby Inline create a Ruby method from the following C code: #include \<stdio.h\> int main(int argc, char \*argv\[\]) { int x; printf("%d\\n",argc); for (x=0; x\<argc; x++) printf("%s\\n",argv\[…

---

## [String matching algorithm](https://www.ruby-forum.com/t/string-matching-algorithm/121182)

<div class="topic-metadata">

**Author:** [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Replies:** 4\
**Last updated:** [November 25, 2007, 3:34am UTC](https://www.ruby-forum.com/t/string-matching-algorithm/121182 "2007-11-25T03:34:44Z")

</div>

Problem: 1 million+ strings (Set A) need to be matched with 1 million+ substrings (Set B). For example: Set A = iliketotraveltohawaii travelmagazine Set B = travel hawaii A(1,2) match “travel” A(1) matches “hawa…

---

## [Iterating through class names using a block](https://www.ruby-forum.com/t/iterating-through-class-names-using-a-block/121129)

<div class="topic-metadata">

**Author:** [@boomstik](https://www.ruby-forum.com/u/boomstik)\
**Replies:** 16\
**Last updated:** [November 25, 2007, 3:30am UTC](https://www.ruby-forum.com/t/iterating-through-class-names-using-a-block/121129 "2007-11-25T03:30:03Z")

</div>

Hey all, this is a total newbie question, i’m just starting to learn Ruby. here’s the thing: i’ve got a couple of arrays with several items in each. I’d like to use a block to iterate through each array, and create o…

---

## [A\[\*a\]+=1 dumps core](https://www.ruby-forum.com/t/a-a-1-dumps-core/121193)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [November 25, 2007, 3:10am UTC](https://www.ruby-forum.com/t/a-a-1-dumps-core/121193 "2007-11-25T03:10:32Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$r\<B9T$9$k$HMn$A$^$9!#e(B $ ./ruby -e ‘a\[\*a\]+=1’ – control frame ---------- c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------ – backtrace of native function call (Use addr2line)…

---

## [The result of Ruby official logo contest](https://www.ruby-forum.com/t/the-result-of-ruby-official-logo-contest/118710)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 86\
**Last updated:** [November 25, 2007, 2:51am UTC](https://www.ruby-forum.com/t/the-result-of-ruby-official-logo-contest/118710 "2007-11-25T02:51:15Z")

</div>

Hello All, As a chairman of the recently formed Ruby Association LLC\[1\], I happily announce the result of our Ruby official logo contest. We received 203 logos from 103 people. TLDs of their mail addresses are .ac, …

---

## [How to read a file and insert it into a mysl blob field](https://www.ruby-forum.com/t/how-to-read-a-file-and-insert-it-into-a-mysl-blob-field/121165)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 2\
**Last updated:** [November 25, 2007, 2:08am UTC](https://www.ruby-forum.com/t/how-to-read-a-file-and-insert-it-into-a-mysl-blob-field/121165 "2007-11-25T02:08:13Z")

</div>

How can I read a localy stored file and insert it into a mysal blob field? Thanx

---

## [C API question: How to handle an error while freeing object](https://www.ruby-forum.com/t/c-api-question-how-to-handle-an-error-while-freeing-object/121187)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 0\
**Last updated:** [November 25, 2007, 1:40am UTC](https://www.ruby-forum.com/t/c-api-question-how-to-handle-an-error-while-freeing-object/121187 "2007-11-25T01:40:30Z")

</div>

This is a C API question. What’s the recommended way to handle an error that occurs while executing the free function that gets called from GC? (That is, the function pointed to by the 3rd argument to Data\_Wrap\_Struct…

---

## [Best library to work Google API?](https://www.ruby-forum.com/t/best-library-to-work-google-api/120852)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 2\
**Last updated:** [November 24, 2007, 11:28pm UTC](https://www.ruby-forum.com/t/best-library-to-work-google-api/120852 "2007-11-24T23:28:27Z")

</div>

I’m going to build a google search tool (no it’s not for spam). What’s the best library for working with Google? I’m not building a website or anything, but would Rails work better for extracting data and outputting t…

---

## [New at regexp and Ruby need help on parsing a string](https://www.ruby-forum.com/t/new-at-regexp-and-ruby-need-help-on-parsing-a-string/121054)

<div class="topic-metadata">

**Author:** [@kadabra](https://www.ruby-forum.com/u/kadabra)\
**Replies:** 9\
**Last updated:** [November 24, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/new-at-regexp-and-ruby-need-help-on-parsing-a-string/121054 "2007-11-24T22:31:01Z")

</div>

I’m building a little test console for a ruby project. When using a function I might get something like this: input\_string =“and stuff and nice things not bad girls not greasy boys and girlsandboys” As you already ha…

---

## [Ruport-util 0.10.0](https://www.ruby-forum.com/t/ruport-util-0-10-0/121169)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [November 24, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/ruport-util-0-10-0/121169 "2007-11-24T20:57:17Z")

</div>

== What is ruport-util? == A collection of utilities and support libraries for Ruby Reports\[0\]. It currently has support for: Basic Graphing (util/graph) Report runner (util/report) Report Mailing (util/mailer) Repor…

---

## [OpenURI::HTTPError: 404 Not Found reading http://gems.rubyforge.org/?](https://www.ruby-forum.com/t/openuri-404-not-found-reading-http-gems-rubyforge-org/121161)

<div class="topic-metadata">

**Author:** [@hadley\_wickham](https://www.ruby-forum.com/u/hadley_wickham)\
**Replies:** 1\
**Last updated:** [November 24, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/openuri-404-not-found-reading-http-gems-rubyforge-org/121161 "2007-11-24T19:56:26Z")

</div>

Hi all, I just upgraded to gems 0.9.5, and now I’m getting: mathpeople: sudo gem install rails ERROR: While executing gem … (Gem::RemoteFetcher::FetchError) OpenURI::HTTPError: 404 Not Found reading http://gems.rub…

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

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