# Ruby

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

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

---

## [Sudo gem install mysql problem](https://www.ruby-forum.com/t/sudo-gem-install-mysql-problem/188089)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 6\
**Last updated:** [May 18, 2010, 7:55pm UTC](https://www.ruby-forum.com/t/sudo-gem-install-mysql-problem/188089 "2010-05-18T19:55:51Z")

</div>

today i have installed ubuntu10.04. pt@pt-laptop:~$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) \[i486-linux\] pt@pt-laptop:~$ gem -v 1.3.5 pt@pt-laptop:~$ sudo gem install mysql Building native extensions. This c…

---

## [Win32ole connect](https://www.ruby-forum.com/t/win32ole-connect/188810)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 7:54pm UTC](https://www.ruby-forum.com/t/win32ole-connect/188810 "2010-05-18T19:54:19Z")

</div>

Hi. With MRI this works: require 'win32ole' wmi = WIN32OLE.connect("winmgmts://") but not with IronRuby undefined method \`connect’ for WIN32OLE:Class Is this expected? Thanks. -rp

---

## [Deaf grandma - almost there](https://www.ruby-forum.com/t/deaf-grandma-almost-there/188805)

<div class="topic-metadata">

**Author:** [@mangoloid](https://www.ruby-forum.com/u/mangoloid)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 7:41pm UTC](https://www.ruby-forum.com/t/deaf-grandma-almost-there/188805 "2010-05-18T19:41:50Z")

</div>

From the Chris P. tutorial for beginners: \*\* Write a Deaf Grandma program. Whatever you say to grandma (whatever you type in), she should respond with HUH?! SPEAK UP, SONNY!, unless you shout it (type in all capital…

---

## [Suggestion: use real capitalization](https://www.ruby-forum.com/t/suggestion-use-real-capitalization/188806)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 7:31pm UTC](https://www.ruby-forum.com/t/suggestion-use-real-capitalization/188806 "2010-05-18T19:31:09Z")

</div>

Currently with ir, we have C:/dev/ruby/os/rakefile:23 within C:\\dev\\ruby\\os\>rake -T (in C:/dev/ruby/os) rake aborted! no such file to load – spec/rake/spectask C:/dev/ruby/os/rakefile:23 In reality, rakefile’s na…

---

## [YAML validation](https://www.ruby-forum.com/t/yaml-validation/188790)

<div class="topic-metadata">

**Author:** [@b0rdslide](https://www.ruby-forum.com/u/b0rdslide)\
**Replies:** 7\
**Last updated:** [May 18, 2010, 7:10pm UTC](https://www.ruby-forum.com/t/yaml-validation/188790 "2010-05-18T19:10:37Z")

</div>

I am sorting through a heap of yaml files looking for the following fields. yml = YAML.load( File.open( yml\_file ) ) feed\_list\[ yml\[‘name’ \] \] = { ‘description’ =\> yml\[ ‘description’ \] || {}, ‘active’ =\> yml\[ ‘…

---

## [Dynamically adding methods to a class](https://www.ruby-forum.com/t/dynamically-adding-methods-to-a-class/188757)

<div class="topic-metadata">

**Author:** [@finality](https://www.ruby-forum.com/u/finality)\
**Replies:** 8\
**Last updated:** [May 18, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/dynamically-adding-methods-to-a-class/188757 "2010-05-18T18:24:03Z")

</div>

Hi! I’m trying to add a method dynamically to a class by opening an existing class, and it actually works. What I don’t understand is why it doesn’t show up when I use the “methods” method on it afterwards. What I do…

---

## [Can ruby-spreadsheet read\\write open office ods files?](https://www.ruby-forum.com/t/can-ruby-spreadsheet-read-write-open-office-ods-files/188766)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 5:40pm UTC](https://www.ruby-forum.com/t/can-ruby-spreadsheet-read-write-open-office-ods-files/188766 "2010-05-18T17:40:33Z")

</div>

there are two files :/home/pt/test/codetable.xls ,/home/pt/test/codetable.ods the program1 can run: require ‘rubygems’ require ‘spreadsheet’ Spreadsheet.client\_encoding = ‘UTF-8’ xls = Spreadsheet.open ‘/home/pt/te…

---

## [Class arrays](https://www.ruby-forum.com/t/class-arrays/188792)

<div class="topic-metadata">

**Author:** [@poseid](https://www.ruby-forum.com/u/poseid)\
**Replies:** 6\
**Last updated:** [May 18, 2010, 4:55pm UTC](https://www.ruby-forum.com/t/class-arrays/188792 "2010-05-18T16:55:27Z")

</div>

Hello, how does this work? class A b = \[1, 2,3\] end =\> \[1, 2, 3\] Is b an instance variable? class variable? how would I access b from outside the class? thanks

---

## [Require': No such file to load -- rubygems](https://www.ruby-forum.com/t/require-no-such-file-to-load-rubygems/188771)

<div class="topic-metadata">

**Author:** [@gerry87](https://www.ruby-forum.com/u/gerry87)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-rubygems/188771 "2010-05-18T16:35:59Z")

</div>

Hey, Was wondering if someone could help, as usual I think I might have messed things up a bit. (Complete noob). I’m on Leopard, ruby 1.8 gem 1.3.7. The problem i’m having is whenever I use require ‘rubygems’ i get t…

---

## [Gui with ruby](https://www.ruby-forum.com/t/gui-with-ruby/188775)

<div class="topic-metadata">

**Author:** [@site-master](https://www.ruby-forum.com/u/site-master)\
**Replies:** 5\
**Last updated:** [May 18, 2010, 3:35pm UTC](https://www.ruby-forum.com/t/gui-with-ruby/188775 "2010-05-18T15:35:17Z")

</div>

could someone please reccomend a good program to create a gui for my ruby programs thanks…

---

## [How to add time to date](https://www.ruby-forum.com/t/how-to-add-time-to-date/188781)

<div class="topic-metadata">

**Author:** [@lucky1234](https://www.ruby-forum.com/u/lucky1234)\
**Replies:** 1\
**Last updated:** [May 18, 2010, 1:58pm UTC](https://www.ruby-forum.com/t/how-to-add-time-to-date/188781 "2010-05-18T13:58:19Z")

</div>

Hi , Am using javascript calender to select date.am saving same date into mydatabase . but it’s saving as 2010-18-05 00-00-00 can amybody help to add time to existed date and it should be like 2010-18-05 11:59:00. c…

---

## [Opening a stream to multiple (possibly zipped) files](https://www.ruby-forum.com/t/opening-a-stream-to-multiple-possibly-zipped-files/188751)

<div class="topic-metadata">

**Author:** [@himdel](https://www.ruby-forum.com/u/himdel)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 1:48pm UTC](https://www.ruby-forum.com/t/opening-a-stream-to-multiple-possibly-zipped-files/188751 "2010-05-18T13:48:04Z")

</div>

Hello, I am interested in opening a single data stream to multiple (possibly gzipped) files, and was wondering if you could do that elegantly in Ruby. I have some dodgy old Perl code that works, but it isn’t really e…

---

## [Read text file and set the radio button values](https://www.ruby-forum.com/t/read-text-file-and-set-the-radio-button-values/188777)

<div class="topic-metadata">

**Author:** [@sweetzubair](https://www.ruby-forum.com/u/sweetzubair)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 12:09pm UTC](https://www.ruby-forum.com/t/read-text-file-and-set-the-radio-button-values/188777 "2010-05-18T12:09:25Z")

</div>

hello, i write this code for getting radio button value from text file but the every time script click on the first value. please help me… text file: String=No Qs1String=Yes Qs2String=Yes Qs3String=Yes Qs4String…

---

## [Trying to install ruby-gtk2 on ubuntu 9.10](https://www.ruby-forum.com/t/trying-to-install-ruby-gtk2-on-ubuntu-9-10/188741)

<div class="topic-metadata">

**Author:** [@Michel\_Revesche](https://www.ruby-forum.com/u/Michel_Revesche)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 9:03am UTC](https://www.ruby-forum.com/t/trying-to-install-ruby-gtk2-on-ubuntu-9-10/188741 "2010-05-18T09:03:34Z")

</div>

I didn’t find the gtk2 library on the ubuntu repositories and searching with google was not successful. So I downloaded the source code on sourceforge and tried to compile. The first step of the process : ruby extcon…

---

## [How to read data in text file and put into the web page](https://www.ruby-forum.com/t/how-to-read-data-in-text-file-and-put-into-the-web-page/188764)

<div class="topic-metadata">

**Author:** [@sweetzubair](https://www.ruby-forum.com/u/sweetzubair)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 8:37am UTC](https://www.ruby-forum.com/t/how-to-read-data-in-text-file-and-put-into-the-web-page/188764 "2010-05-18T08:37:01Z")

</div>

I want to read the Radio button value or drop down value from the text file. please guide me… i write code for reading text value its working fine but no idea about radio button or dropdown list values.

---

## [Freetds implementation in Ruby](https://www.ruby-forum.com/t/freetds-implementation-in-ruby/187869)

<div class="topic-metadata">

**Author:** [@Thiago\_Morais](https://www.ruby-forum.com/u/Thiago_Morais)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 3:30am UTC](https://www.ruby-forum.com/t/freetds-implementation-in-ruby/187869 "2010-05-18T03:30:32Z")

</div>

Hi there, Do you guys know about any implementation of the freetds protocol in Ruby? If not, it’s possible to implement i? Or there’s some kind of constraints in doing it ? I’ve found this project, http://rubyforge.o…

---

## [GServer Miultiple Clients - Collisions](https://www.ruby-forum.com/t/gserver-miultiple-clients-collisions/188599)

<div class="topic-metadata">

**Author:** [@eudeyrn](https://www.ruby-forum.com/u/eudeyrn)\
**Replies:** 2\
**Last updated:** [May 17, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/gserver-miultiple-clients-collisions/188599 "2010-05-17T22:42:57Z")

</div>

I’ve got a small problem using gserver with multiple client connections. Let me give some quick background on my problem: I’m running a Ruby script on a dozen or so different machines, doing some basic performance mon…

---

## [Jruby 1.5 require 'sqljdbc.jar' no longer working](https://www.ruby-forum.com/t/jruby-1-5-require-sqljdbc-jar-no-longer-working/188554)

<div class="topic-metadata">

**Author:** [@christoforever](https://www.ruby-forum.com/u/christoforever)\
**Replies:** 7\
**Last updated:** [May 17, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/jruby-1-5-require-sqljdbc-jar-no-longer-working/188554 "2010-05-17T22:15:03Z")

</div>

to load the sqljdbc.jar I’ve been using require ‘sqljdbc.jar’ with that jar file located in the sources directory and then using java\_import to call the class name. This worked in jruby 1.4 but now does not work in 1.…

---

## [Opening my files with a ruby program](https://www.ruby-forum.com/t/opening-my-files-with-a-ruby-program/188750)

<div class="topic-metadata">

**Author:** [@site-master](https://www.ruby-forum.com/u/site-master)\
**Replies:** 3\
**Last updated:** [May 17, 2010, 9:28pm UTC](https://www.ruby-forum.com/t/opening-my-files-with-a-ruby-program/188750 "2010-05-17T21:28:48Z")

</div>

i was just wondering if i wanted my program to open a file on my pc what would i put for example if i wanted to use ruby irb to open media player thanks

---

## [Iterating over sub arrays](https://www.ruby-forum.com/t/iterating-over-sub-arrays/188706)

<div class="topic-metadata">

**Author:** [@James\_H.on](https://www.ruby-forum.com/u/James_H.on)\
**Replies:** 3\
**Last updated:** [May 17, 2010, 8:44pm UTC](https://www.ruby-forum.com/t/iterating-over-sub-arrays/188706 "2010-05-17T20:44:54Z")

</div>

Hey folks, I feel like there’s a really, really simple solution to this problem, but I’m just missing it. \<-----code-----\> array1 = \[“0”, “1”, “2”, “3”\] array2 = \[“jam”, “bees”, “please”\] array3 = \[“6”, “7”, “8”\] a…

---

## [Question about rdoc (2.5.8)](https://www.ruby-forum.com/t/question-about-rdoc-2-5-8/188361)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 5\
**Last updated:** [May 17, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/question-about-rdoc-2-5-8/188361 "2010-05-17T20:08:02Z")

</div>

The answer is probably ‘No! Why on earth would you want to do that?’ but, I have to ask. Is there an Rdoc directive that forces an arbitrary line of Ruby code into the document? I have this sort of thing in a Cucumbe…

---

## [Scraping html behind a log-in](https://www.ruby-forum.com/t/scraping-html-behind-a-log-in/188748)

<div class="topic-metadata">

**Author:** [@csitol](https://www.ruby-forum.com/u/csitol)\
**Replies:** 1\
**Last updated:** [May 17, 2010, 7:27pm UTC](https://www.ruby-forum.com/t/scraping-html-behind-a-log-in/188748 "2010-05-17T19:27:39Z")

</div>

I’ve used libraries, such as hpricot, to scrape html from public sites. Does anyone know how to get at data behind a user log-in? I’m trying to automate a service that periodically grabs data for a user. You could t…

---

## [Strange error in ruby 1.9.1](https://www.ruby-forum.com/t/strange-error-in-ruby-1-9-1/188744)

<div class="topic-metadata">

**Author:** [@brandentanga](https://www.ruby-forum.com/u/brandentanga)\
**Replies:** 3\
**Last updated:** [May 17, 2010, 6:58pm UTC](https://www.ruby-forum.com/t/strange-error-in-ruby-1-9-1/188744 "2010-05-17T18:58:16Z")

</div>

Hello all, I just compiled ruby 1.9.1 from source on my computer (osx snow leopard), and I’m going through the old ruby quiz exercises for fun. I’m on the secret santa one, and I wrote the code that determines that ea…

---

## [IronRuby and ODBC](https://www.ruby-forum.com/t/ironruby-and-odbc/188743)

<div class="topic-metadata">

**Author:** [@Tim\_Sjoberg](https://www.ruby-forum.com/u/Tim_Sjoberg)\
**Replies:** 1\
**Last updated:** [May 17, 2010, 6:14pm UTC](https://www.ruby-forum.com/t/ironruby-and-odbc/188743 "2010-05-17T18:14:28Z")

</div>

Hi I’m currently running IronRuby (on Rails, in IIS7) on Windows Server 2008 connecting to SQLServer 2008. As per the guide I am using the activerecord-sqlserver-adapter in ADONET mode. It is working fine except tha…

---

## [Is Bundler Overkill?](https://www.ruby-forum.com/t/is-bundler-overkill/188658)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 6\
**Last updated:** [May 17, 2010, 6:08pm UTC](https://www.ruby-forum.com/t/is-bundler-overkill/188658 "2010-05-17T18:08:01Z")

</div>

This morning I thought about Bundler for a long time. I ended up writing a blog post on the subject. I realize some of my assumptions about “why” may be somewhat off, but certainly they still apply even if they are no…

---

## [JRuby 1.5.0 picking and Java classpath](https://www.ruby-forum.com/t/jruby-1-5-0-picking-and-java-classpath/188609)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 6\
**Last updated:** [May 17, 2010, 5:04pm UTC](https://www.ruby-forum.com/t/jruby-1-5-0-picking-and-java-classpath/188609 "2010-05-17T17:04:48Z")

</div>

Hi, Has anyone had problems with JRuby 1.5.0 picking up the Java classpath? My classpath is: CLASSPATH=C:\\jruby-1.5.0.RC1\\lib\\ojdbc14-10.2.0.4.0.jar The Oracle JDBC is located within the path, but I am receiving: ja…

---

## [Range on strings](https://www.ruby-forum.com/t/range-on-strings/188584)

<div class="topic-metadata">

**Author:** [@Vikrant\_C](https://www.ruby-forum.com/u/Vikrant_C)\
**Replies:** 12\
**Last updated:** [May 17, 2010, 5:02pm UTC](https://www.ruby-forum.com/t/range-on-strings/188584 "2010-05-17T17:02:27Z")

</div>

Hi, If I do - (‘A’…‘Z’).include?(‘AA’) It returns “true”, while (‘A’…‘Z’).to\_a.include?(‘AA’) (of course) returns “false”. Is it intentional or possibly a bug? I’m using ruby 1.8.7 (2010-01-10 patchlevel 249) \[x86\_…

---

## [How to read pointer data with Win32::API](https://www.ruby-forum.com/t/how-to-read-pointer-data-with-win32-api/188674)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 1\
**Last updated:** [May 17, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/how-to-read-pointer-data-with-win32-api/188674 "2010-05-17T16:56:15Z")

</div>

I have a case where I’m using Win32::API like this: GMEM\_FIXED = 0 a = GlobalAlloc(GMEM\_FIXED, x) # x is some large number b = GlobalLock(a) … GetDIBits(\_, \_, \_, \_, b, \_, \_) # \_ are just some variables, which are n…

---

## [Migration to java](https://www.ruby-forum.com/t/migration-to-java/188738)

<div class="topic-metadata">

**Author:** [@sakhi](https://www.ruby-forum.com/u/sakhi)\
**Replies:** 2\
**Last updated:** [May 17, 2010, 4:47pm UTC](https://www.ruby-forum.com/t/migration-to-java/188738 "2010-05-17T16:47:49Z")

</div>

i have some requirement where i m thinking to migrate my ruby on rails application to JAVA. can anyone tell me what are the which i could face if i go for this migration? What are the pros and cons of using jruby inst…

---

## [Anonymous class](https://www.ruby-forum.com/t/anonymous-class/188736)

<div class="topic-metadata">

**Author:** [@wladjmir](https://www.ruby-forum.com/u/wladjmir)\
**Replies:** 0\
**Last updated:** [May 17, 2010, 2:59pm UTC](https://www.ruby-forum.com/t/anonymous-class/188736 "2010-05-17T14:59:26Z")

</div>

Hi, in a little macruby-cocoa app when i try to save a simple hash (attribute of a model class) inside the fileWrapperOfType method via Marshal.load( Marshal.dump(@model.data)) #deep copy , i get an error: \`fileWrapp…

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

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