# Ruby

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

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

---

## [Problem install mysql Gem OS 10.6.4](https://www.ruby-forum.com/t/problem-install-mysql-gem-os-10-6-4/195257)

<div class="topic-metadata">

**Author:** [@webwizart](https://www.ruby-forum.com/u/webwizart)\
**Replies:** 6\
**Last updated:** [September 20, 2010, 6:46pm UTC](https://www.ruby-forum.com/t/problem-install-mysql-gem-os-10-6-4/195257 "2010-09-20T18:46:15Z")

</div>

Hello there, I’m trying to install the Mysql Gem but getting error’s. I read a few artikels on the forum here, but honestly i don’t understand the problem. Im running ruby 1.8 on a mac osX 10.6.4 ERROR = sudo gem i…

---

## [Job opportunity - ruby developer - cambridge, england](https://www.ruby-forum.com/t/job-opportunity-ruby-developer-cambridge-england/195254)

<div class="topic-metadata">

**Author:** [@wilf123](https://www.ruby-forum.com/u/wilf123)\
**Replies:** 0\
**Last updated:** [September 20, 2010, 4:34pm UTC](https://www.ruby-forum.com/t/job-opportunity-ruby-developer-cambridge-england/195254 "2010-09-20T16:34:22Z")

</div>

My client, a leading academic research institution, is looking for a talented and academic minded Ruby developer to support their team in the delivery of solutions for site wide tracking of samples and lab ware. A job…

---

## [SSLSocket -- Connection reset by peer](https://www.ruby-forum.com/t/sslsocket-connection-reset-by-peer/195213)

<div class="topic-metadata">

**Author:** [@globallyunique](https://www.ruby-forum.com/u/globallyunique)\
**Replies:** 3\
**Last updated:** [September 20, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/sslsocket-connection-reset-by-peer/195213 "2010-09-20T16:27:19Z")

</div>

Hi Guys, I’m having a weird (to me, at least) problem trying to connect to an SSL socket using a custom protocol and read and send some data. Any help would be greatly appreciated. I’m getting the error: /usr/lib/r…

---

## [How can this Java method header be represented in Ruby](https://www.ruby-forum.com/t/how-can-this-java-method-header-be-represented-in-ruby/195230)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 7\
**Last updated:** [September 20, 2010, 4:00pm UTC](https://www.ruby-forum.com/t/how-can-this-java-method-header-be-represented-in-ruby/195230 "2010-09-20T16:00:02Z")

</div>

I have a Java method header that looks something like follows: public static short\[\]\[\] setFile(String fileName) { … } How can I write this in Ruby? Thanks.

---

## [File.open(path, "wb")](https://www.ruby-forum.com/t/file-open-path-wb/195247)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 2\
**Last updated:** [September 20, 2010, 2:46pm UTC](https://www.ruby-forum.com/t/file-open-path-wb/195247 "2010-09-20T14:46:34Z")

</div>

At: Ruby on Rails - File Uploading | Tutorialspoint And, in: File.open(path, “wb”) What is meant by “wb”? Thanks.

---

## [Mechanize file save on generated link](https://www.ruby-forum.com/t/mechanize-file-save-on-generated-link/194873)

<div class="topic-metadata">

**Author:** [@dkam](https://www.ruby-forum.com/u/dkam)\
**Replies:** 7\
**Last updated:** [September 20, 2010, 2:39pm UTC](https://www.ruby-forum.com/t/mechanize-file-save-on-generated-link/194873 "2010-09-20T14:39:01Z")

</div>

Hi there, I’m working on a project to automate retrieval of content and the download of a pdf bill from an ISPs website. I have 30 connections with this ISP and each has its own username and password. So far I have be…

---

## [Name = upload\['datafile'\].original\_filename](https://www.ruby-forum.com/t/name-upload-datafile-original-filename/195244)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 2\
**Last updated:** [September 20, 2010, 2:34pm UTC](https://www.ruby-forum.com/t/name-upload-datafile-original-filename/195244 "2010-09-20T14:34:55Z")

</div>

At: Ruby on Rails - File Uploading | Tutorialspoint And, regarding: name = upload\[‘datafile’\].original\_filename It mentions that “upload” is a CGI object. If you look at the header of the function this line is part …

---

## [How to handle authentication pop-up when the machine is lock](https://www.ruby-forum.com/t/how-to-handle-authentication-pop-up-when-the-machine-is-lock/195246)

<div class="topic-metadata">

**Author:** [@parulg2386](https://www.ruby-forum.com/u/parulg2386)\
**Replies:** 0\
**Last updated:** [September 20, 2010, 1:54pm UTC](https://www.ruby-forum.com/t/how-to-handle-authentication-pop-up-when-the-machine-is-lock/195246 "2010-09-20T13:54:00Z")

</div>

I am facing issues while handling authentication pop-up when my machine is locked. I have scheduled my ruby script to run at a particular time. The script does not get executed when it encounters an authentication pop…

---

## [Check if Win32OLE still available](https://www.ruby-forum.com/t/check-if-win32ole-still-available/193839)

<div class="topic-metadata">

**Author:** [@Reinhart\_V](https://www.ruby-forum.com/u/Reinhart_V)\
**Replies:** 8\
**Last updated:** [September 20, 2010, 1:50pm UTC](https://www.ruby-forum.com/t/check-if-win32ole-still-available/193839 "2010-09-20T13:50:40Z")

</div>

In ruby i use these commands: application = WIN32OLE.new(‘MSProject.Application’) application.visible = TRUE application.FileOpen(filepath) project = application.ActiveProject now if the user closes MS Project, any …

---

## [Constructor (Java) ---\> initialize (Ruby)](https://www.ruby-forum.com/t/constructor-java-initialize-ruby/195233)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 5\
**Last updated:** [September 20, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/constructor-java-initialize-ruby/195233 "2010-09-20T13:20:14Z")

</div>

Like constructors in Java, I understood that in Ruby, we use “initialize” for this issue. If I have the following in Java: public class ReadFile { public static short\[\]\[\] setFile(fileName) { ReadFile rf = new Read…

---

## [Nokogiri error](https://www.ruby-forum.com/t/nokogiri-error/195229)

<div class="topic-metadata">

**Author:** [@Senthil\_kumar\_L](https://www.ruby-forum.com/u/Senthil_kumar_L)\
**Replies:** 1\
**Last updated:** [September 20, 2010, 11:45am UTC](https://www.ruby-forum.com/t/nokogiri-error/195229 "2010-09-20T11:45:42Z")

</div>

I am getting the below error when I am working with nokogiri version 1.4.3.1 “!! Unexpected error while processing request: undefined method \`children’ for nil:NilClass”. But my app works great with the other version…

---

## [Installing files outside /usr/lib/ruby/ using rubygems](https://www.ruby-forum.com/t/installing-files-outside-usr-lib-ruby-using-rubygems/195232)

<div class="topic-metadata">

**Author:** [@crocco](https://www.ruby-forum.com/u/crocco)\
**Replies:** 0\
**Last updated:** [September 20, 2010, 11:24am UTC](https://www.ruby-forum.com/t/installing-files-outside-usr-lib-ruby-using-rubygems/195232 "2010-09-20T11:24:55Z")

</div>

Hello to everyone. I’m writing an application using the KDE ruby bindings and I’d like to package it as a gem. However, for the application to integrate correctly with KDE, a file with extension .desktop needs to be…

---

## [A new Ruby book](https://www.ruby-forum.com/t/a-new-ruby-book/195201)

<div class="topic-metadata">

**Author:** [@mindaslab](https://www.ruby-forum.com/u/mindaslab)\
**Replies:** 8\
**Last updated:** [September 20, 2010, 10:35am UTC](https://www.ruby-forum.com/t/a-new-ruby-book/195201 "2010-09-20T10:35:47Z")

</div>

Hello People, Outof love of Ruby, I have written a book for self study. Now its available at Page Not Found | Lulu , hope you find it useful.

---

## [TryRuby on 1.9.2 with all lessons working](https://www.ruby-forum.com/t/tryruby-on-1-9-2-with-all-lessons-working/195224)

<div class="topic-metadata">

**Author:** [@akm](https://www.ruby-forum.com/u/akm)\
**Replies:** 0\
**Last updated:** [September 20, 2010, 7:07am UTC](https://www.ruby-forum.com/t/tryruby-on-1-9-2-with-all-lessons-working/195224 "2010-09-20T07:07:23Z")

</div>

Greetings, I probably should start assigning version numbers to TryRuby. If I were to, I’d call this a 0.7 release. The lessons are now all fully working with no new security holes opened-- I am hoping. The other bit…

---

## [Learning Shoes - Have some questions!](https://www.ruby-forum.com/t/learning-shoes-have-some-questions/195202)

<div class="topic-metadata">

**Author:** [@rubina](https://www.ruby-forum.com/u/rubina)\
**Replies:** 1\
**Last updated:** [September 20, 2010, 6:12am UTC](https://www.ruby-forum.com/t/learning-shoes-have-some-questions/195202 "2010-09-20T06:12:58Z")

</div>

Hello All, I recently started playing with Shoes to learn it during my Ruby learning journey. It appears to be easy, although the current doc is not what a beginner like I would prefer. googling around I found a nic…

---

## [To\_json / to\_xml: where to find?](https://www.ruby-forum.com/t/to-json-to-xml-where-to-find/195216)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 1\
**Last updated:** [September 20, 2010, 4:24am UTC](https://www.ruby-forum.com/t/to-json-to-xml-where-to-find/195216 "2010-09-20T04:24:42Z")

</div>

I’m trying to use to\_xls, but are running into documentation problems: Instead of completely describing the options, the author writes: “The builder options are the same as to\_json / to\_xml, except for the :include.” …

---

## [\[cext\] io.cpp build error](https://www.ruby-forum.com/t/cext-io-cpp-build-error/194976)

<div class="topic-metadata">

**Author:** [@ratchetcat](https://www.ruby-forum.com/u/ratchetcat)\
**Replies:** 2\
**Last updated:** [September 20, 2010, 12:03am UTC](https://www.ruby-forum.com/t/cext-io-cpp-build-error/194976 "2010-09-20T00:03:09Z")

</div>

7c9936c fails to build on the Win7 Ultimate 32-bit ad-hoc manual CI box… C:\\Users\\Jon\\Documents\\JavaDev\\jruby\>ant clean cext …… \[exec\] g++ -DNDEBUG -O2 -fno-omit-frame-pointer -fno-strict-aliasing -W -Wall -W no-un…

---

## [\[ann\] arcadia ide 0.9.0](https://www.ruby-forum.com/t/ann-arcadia-ide-0-9-0/195215)

<div class="topic-metadata">

**Author:** [@guerra](https://www.ruby-forum.com/u/guerra)\
**Replies:** 0\
**Last updated:** [September 19, 2010, 11:40pm UTC](https://www.ruby-forum.com/t/ann-arcadia-ide-0-9-0/195215 "2010-09-19T23:40:33Z")

</div>

Arcadia is a Light Integrated Development Environment (IDE) for Ruby language written in classic Ruby using the classic tcl/tk GUI toolkit. Some of Arcadia ide project features include: Editor with source browsing, …

---

## [Have some Shoes questions!](https://www.ruby-forum.com/t/have-some-shoes-questions/195214)

<div class="topic-metadata">

**Author:** [@rubina](https://www.ruby-forum.com/u/rubina)\
**Replies:** 0\
**Last updated:** [September 19, 2010, 11:27pm UTC](https://www.ruby-forum.com/t/have-some-shoes-questions/195214 "2010-09-19T23:27:27Z")

</div>

Hello All, I recently started playing with Shoes to learn it during my Ruby learning journey. It appears to be easy, although the current doc is not what a beginner like I would prefer. googling around I found a nic…

---

## [More flexible inheritance](https://www.ruby-forum.com/t/more-flexible-inheritance/85953)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 17\
**Last updated:** [September 19, 2010, 9:42pm UTC](https://www.ruby-forum.com/t/more-flexible-inheritance/85953 "2010-09-19T21:42:44Z")

</div>

A notion came to me yesterday with regards to how we extend classes. On the one hand we can create a module and include it into a class, but this will not allow us to override a preexisting method – for that we must r…

---

## [Get hours, seconds and time from Date.day\_fraction\_to\_time](https://www.ruby-forum.com/t/get-hours-seconds-and-time-from-date-day-fraction-to-time/195128)

<div class="topic-metadata">

**Author:** [@dierre](https://www.ruby-forum.com/u/dierre)\
**Replies:** 3\
**Last updated:** [September 19, 2010, 8:25pm UTC](https://www.ruby-forum.com/t/get-hours-seconds-and-time-from-date-day-fraction-to-time/195128 "2010-09-19T20:25:23Z")

</div>

start = DateTime.now sleep 15 stop = DateTime.now #minutes puts ((stop-start) \* 24 \* 60).to\_i hours,minutes,seconds,frac = Date.day\_fraction\_to\_time(stop-start) I have the following error: \`\<main\>': privat…

---

## [redmine.ruby-lang.org$B$N(Bproject$B?t$r8:$i$;$J$$$+!)(B](https://www.ruby-forum.com/t/redmine-ruby-lang-org-b-n-bproject-b-t-r8-i-j-b/193461)

<div class="topic-metadata">

**Author:** [@NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/u/NAKAMURAS_Hiroshi)\
**Replies:** 2\
**Last updated:** [September 19, 2010, 10:36am UTC](https://www.ruby-forum.com/t/redmine-ruby-lang-org-b-n-bproject-b-t-r8-i-j-b/193461 "2010-09-19T10:36:29Z")

</div>

e$B:rF|e(Bakre$B$5$s$H$bOC$7$?$N$G$9$,!“8=:\_e(Bredmine.ruby-lang.orge$B$KEPO?$5$l$F$$$ke(B Rubye$B3+H/%W%m%8%'%/%H!Je(B1.9 / 1.9.1 / 1.8 / 1.8.7 / 1.8.6 / anye$B!K$,B?$9$.e(B e$B$k$s$8$c$J$$$+!”$H;W$C$F$$$^$9!#e(B e…

---

## [Problem on an example from ruby-lang.org](https://www.ruby-forum.com/t/problem-on-an-example-from-ruby-lang-org/195191)

<div class="topic-metadata">

**Author:** [@awvalenti](https://www.ruby-forum.com/u/awvalenti)\
**Replies:** 1\
**Last updated:** [September 18, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/problem-on-an-example-from-ruby-lang-org/195191 "2010-09-18T23:17:56Z")

</div>

Hello all, I’m new to Ruby and I’ve been taking a look at the “Getting Started” stuff from ruby-lang.org. I found the following example from http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/: class…

---

## [Converting number to its digits as an array](https://www.ruby-forum.com/t/converting-number-to-its-digits-as-an-array/195103)

<div class="topic-metadata">

**Author:** [@rubyishardScore](https://www.ruby-forum.com/u/rubyishardScore)\
**Replies:** 9\
**Last updated:** [September 18, 2010, 11:14pm UTC](https://www.ruby-forum.com/t/converting-number-to-its-digits-as-an-array/195103 "2010-09-18T23:14:27Z")

</div>

I’m new to ruby and I was trying to solve a problem where I convert a number into an array in such a way. If I have the number 12345, how do I take that number and put it into an array but where each element is a digi…

---

## [Search and replace](https://www.ruby-forum.com/t/search-and-replace/195155)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 11\
**Last updated:** [September 18, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/search-and-replace/195155 "2010-09-18T21:55:07Z")

</div>

Hi everyone, I want to be able to run a program that will do a bunch of searches specified in an array of strings, and replace the first occurrence of those strings with strings specified on a second array for a give…

---

## [Rawr with ruby gem](https://www.ruby-forum.com/t/rawr-with-ruby-gem/195180)

<div class="topic-metadata">

**Author:** [@cyberjom](https://www.ruby-forum.com/u/cyberjom)\
**Replies:** 2\
**Last updated:** [September 18, 2010, 7:23pm UTC](https://www.ruby-forum.com/t/rawr-with-ruby-gem/195180 "2010-09-18T19:23:20Z")

</div>

Need help. I am trying to build little jruby application require activerecord to connect to oracle. when I use jruby -S rake rawr:jar and got a package folder. I can test it with java -jar \[jar.jar\] but when deploy …

---

## [Ruby regexpresion, error? :-(](https://www.ruby-forum.com/t/ruby-regexpresion-error/195184)

<div class="topic-metadata">

**Author:** [@imelody](https://www.ruby-forum.com/u/imelody)\
**Replies:** 8\
**Last updated:** [September 18, 2010, 5:23pm UTC](https://www.ruby-forum.com/t/ruby-regexpresion-error/195184 "2010-09-18T17:23:40Z")

</div>

I want to match last chars of the line, def show\_regexp(a,re) if a =~ re “#{$\`}\<\<#{$&}\>\>#{$’}” else “no match” end end puts show\_regexp(“abc as;”,/^a/) puts show\_regexp(“abc as;”,/as$/) puts show\_regexp(“abc as…

---

## [Using send to define object methods](https://www.ruby-forum.com/t/using-send-to-define-object-methods/195172)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 2\
**Last updated:** [September 18, 2010, 10:47am UTC](https://www.ruby-forum.com/t/using-send-to-define-object-methods/195172 "2010-09-18T10:47:16Z")

</div>

Hello If I want to add a method to a class, I can use send as shown below. Is there a similar way to use send to add a method to an object? class MyClass end MyClass.send(:define\_method, :poof) {‘I say poof!’} x =…

---

## [Open for exclusive read](https://www.ruby-forum.com/t/open-for-exclusive-read/195169)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 0\
**Last updated:** [September 18, 2010, 5:55am UTC](https://www.ruby-forum.com/t/open-for-exclusive-read/195169 "2010-09-18T05:55:50Z")

</div>

I am on a Windows machine. Is there a way to tell Ruby to open a file for share\_none? Ralph

---

## [Method\_missing](https://www.ruby-forum.com/t/method-missing/195127)

<div class="topic-metadata">

**Author:** [@diego\_v](https://www.ruby-forum.com/u/diego_v)\
**Replies:** 7\
**Last updated:** [September 18, 2010, 2:01am UTC](https://www.ruby-forum.com/t/method-missing/195127 "2010-09-18T02:01:45Z")

</div>

Hello, This is my first email that I send to this ML, so hi everyone :slight\_smile: I’ve been using Ruby for 2 years or more now, and I am still learning this awesome language. But I can’t grasp my head about method\_m…

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

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