# Ruby

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

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

---

## [Mysql & Ruby in windows, it's possible ?!](https://www.ruby-forum.com/t/mysql-ruby-in-windows-its-possible/139637)

<div class="topic-metadata">

**Author:** [@m4lloc](https://www.ruby-forum.com/u/m4lloc)\
**Replies:** 5\
**Last updated:** [June 6, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/mysql-ruby-in-windows-its-possible/139637 "2008-06-06T17:42:18Z")

</div>

\#Program: require ‘mysql’ m = Mysql.new(“localhost”,“root”,“your\_password”,“library”) r = m.query(“SELECT \* FROM autor ORDER BY nome”) r.each\_hash do |f| print “#{f\[‘nome’\]} - #{f\[‘sobrenome’\]}” end #error C:/Ins…

---

## [Dominos Pizza order tracking script](https://www.ruby-forum.com/t/dominos-pizza-order-tracking-script/139647)

<div class="topic-metadata">

**Author:** [@Dana\_M](https://www.ruby-forum.com/u/Dana_M)\
**Replies:** 2\
**Last updated:** [June 6, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/dominos-pizza-order-tracking-script/139647 "2008-06-06T17:41:43Z")

</div>

I just finished throwing together a script to track your Dominos order via the terminal. The idea and the original code was taken from another person who originally wrote the script in Python. I decided I wanted to p…

---

## [Ensuring only one instance of a script is running](https://www.ruby-forum.com/t/ensuring-only-one-instance-of-a-script-is-running/138224)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 13\
**Last updated:** [June 6, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/ensuring-only-one-instance-of-a-script-is-running/138224 "2008-06-06T17:12:14Z")

</div>

Hi all, I’m probably late to the game on this, but I stumbled across an interesting use for DATA. You can use it to ensure only one instance of a given script is running by using flock: class Foo def self.mainloop …

---

## [Erb question --urgent help needed?](https://www.ruby-forum.com/t/erb-question-urgent-help-needed/139708)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 5\
**Last updated:** [June 6, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/erb-question-urgent-help-needed/139708 "2008-06-06T16:34:24Z")

</div>

i don’t know how to explain my problem here i am showing it by an example \<% string=“Hello Ruby ,How are you” # any String object width=28 # because width of the below erb tag is 28 %\> \<%…

---

## [Net/http and redirects](https://www.ruby-forum.com/t/net-http-and-redirects/139717)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 2\
**Last updated:** [June 6, 2008, 4:21pm UTC](https://www.ruby-forum.com/t/net-http-and-redirects/139717 "2008-06-06T16:21:23Z")

</div>

Hello, I wrote this piece of code: http://pastebin.com/m138ec5e4 I was looking at the examples posted on: The problem seems to be that google is somehow redirecting and net http isn’t following. Is this known behavi…

---

## [Configuration Inquiry](https://www.ruby-forum.com/t/configuration-inquiry/139696)

<div class="topic-metadata">

**Author:** [@visaolive](https://www.ruby-forum.com/u/visaolive)\
**Replies:** 4\
**Last updated:** [June 6, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/configuration-inquiry/139696 "2008-06-06T15:45:50Z")

</div>

I’ve been racking my brain on configurations of Ruby, Rails, and Streamlined or Active Scaffold. It always seems that upon starting my web server, I receive error messages which keeps my web server from starting prope…

---

## [Rspec logging](https://www.ruby-forum.com/t/rspec-logging/139728)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 0\
**Last updated:** [June 6, 2008, 12:56pm UTC](https://www.ruby-forum.com/t/rspec-logging/139728 "2008-06-06T12:56:02Z")

</div>

Hi, I am trying to find some output logging in the Rspec API As I don’t want to do this Then "the resultant links are displayed with the search text in each description" do browser.links.each do |lnk| if lnk…

---

## [Problems upgrading from jruby-1.0.2 to jruby1.1.2](https://www.ruby-forum.com/t/problems-upgrading-from-jruby-1-0-2-to-jruby1-1-2/139723)

<div class="topic-metadata">

**Author:** [@Thomas\_Malone](https://www.ruby-forum.com/u/Thomas_Malone)\
**Replies:** 0\
**Last updated:** [June 6, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/problems-upgrading-from-jruby-1-0-2-to-jruby1-1-2/139723 "2008-06-06T12:25:55Z")

</div>

When I upgraded my app from jruby 1.0.2 to jruby 1.1.2 I got the following exception: \[exec\] /Users/dev/trunk/netstream-tools/jruby-1.1.2/lib/ruby/site\_ruby/1.8/builtin/ javasupport/java.rb:42:in method\_missing': wr…

---

## [StringIO#ungetc returns dupes in Ruby1.9?](https://www.ruby-forum.com/t/stringio-ungetc-returns-dupes-in-ruby1-9/139722)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 0\
**Last updated:** [June 6, 2008, 11:53am UTC](https://www.ruby-forum.com/t/stringio-ungetc-returns-dupes-in-ruby1-9/139722 "2008-06-06T11:53:29Z")

</div>

First, I apologize if this was a known issue – couldn’t find any mention of it in English. Seems to happen only in Ruby 1.9, and I’ve only tried with the version that comes with my Ubuntu repositories: $ ruby1.9 --v…

---

## [Ruby1.8.7 $B$G(B Rails2.0.2 $B$,F0$+$J$$(B](https://www.ruby-forum.com/t/ruby1-8-7-b-g-b-rails2-0-2-b-f0-j-b/139585)

<div class="topic-metadata">

**Author:** [@okkez](https://www.ruby-forum.com/u/okkez)\
**Replies:** 4\
**Last updated:** [June 6, 2008, 11:39am UTC](https://www.ruby-forum.com/t/ruby1-8-7-b-g-b-rails2-0-2-b-f0-j-b/139585 "2008-06-06T11:39:16Z")

</div>

okkez e$B$G$9!#e(B Ruby1.8.7 e$B$Ge(B Rails 2.0.2 e$B$,F0$-$^$;$s!#e(B e$B\<+J,$G%S%k%I$7$?$N$He(B Debian e$B$N%Q%C%1!\<%8$r;n$7$^$7$?!#e(B e$B0J2\<$G:F8=$9$k$H;W$$$^$9!#e(B $ rails 2.0.2 hoge $ cd hoge $ script/gener…

---

## [Threading in ruby](https://www.ruby-forum.com/t/threading-in-ruby/139713)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [June 6, 2008, 11:10am UTC](https://www.ruby-forum.com/t/threading-in-ruby/139713 "2008-06-06T11:10:15Z")

</div>

Hi I have succesfully send mail from my rails application…I did it like below.What I am doing is send a mail to an assignee. def after\_transfer code-------- code------ send\_mail\_to\_primary\_assignee(assignee\_id) en…

---

## [June Phoenix Ruby User Group Meeting: Rapid Desktop App Development with Monkeybars](https://www.ruby-forum.com/t/june-phoenix-ruby-user-group-meeting-rapid-desktop-app-development-with-monkeybars/139711)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [June 6, 2008, 8:51am UTC](https://www.ruby-forum.com/t/june-phoenix-ruby-user-group-meeting-rapid-desktop-app-development-with-monkeybars/139711 "2008-06-06T08:51:20Z")

</div>

June Phoenix Ruby U. Group Meeting Date: Monday, June 9, 2008 Time: 6:00 pm - Socializing 6:30 pm - Official start of meeting Place: Happy Camper Studios 4643 E. Thomas Rd, Suite #3 Phoenix, AZ 85018 (602) 714-1…

---

## [Removing Special Chars from a String](https://www.ruby-forum.com/t/removing-special-chars-from-a-string/139569)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 3\
**Last updated:** [June 6, 2008, 8:30am UTC](https://www.ruby-forum.com/t/removing-special-chars-from-a-string/139569 "2008-06-06T08:30:37Z")

</div>

Hello, I’m pulling some fields out of an Oracle database and creating a CSV. However, some fields have \\n and \\r in them, which messes up my CSV. Is there a special function or a certain way I should try to get rid of …

---

## [Conflict between soap4r gem and stdlib](https://www.ruby-forum.com/t/conflict-between-soap4r-gem-and-stdlib/139704)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 1\
**Last updated:** [June 6, 2008, 7:41am UTC](https://www.ruby-forum.com/t/conflict-between-soap4r-gem-and-stdlib/139704 "2008-06-06T07:41:12Z")

</div>

I installed a newer version of soap4r as a gem, but, when I require soap, the old version (which came with ruby) is the one that is loaded. $ ruby -r soap/soap -e ‘p SOAP::VERSION’ “1.5.5” $ grep VERSION /usr/local/…

---

## [Newbie question concerning ruby and mysql](https://www.ruby-forum.com/t/newbie-question-concerning-ruby-and-mysql/139689)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 7\
**Last updated:** [June 6, 2008, 6:51am UTC](https://www.ruby-forum.com/t/newbie-question-concerning-ruby-and-mysql/139689 "2008-06-06T06:51:20Z")

</div>

Hi, I’m taking this flat file and putting it into a mysql table. The question is, given the code I will be working from, what’s the Ruby way to skip the first line? Here’s the table “zip code”, “state abbreviation”,…

---

## [Re: IronRuby got /.-ed](https://www.ruby-forum.com/t/re-ironruby-got-ed/139699)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 0\
**Last updated:** [June 6, 2008, 5:38am UTC](https://www.ruby-forum.com/t/re-ironruby-got-ed/139699 "2008-06-06T05:38:09Z")

</div>

I had a serious headache after reading throught that thread on the slashdot. Unni ----- Original Message ---- From: Oleg T. removed\_email\_address@domain.invalid To: removed\_email\_address@domain.invalid Sent: Tuesda…

---

## [SQL Parser in Ruby](https://www.ruby-forum.com/t/sql-parser-in-ruby/99607)

<div class="topic-metadata">

**Author:** [@nicwilliams](https://www.ruby-forum.com/u/nicwilliams)\
**Replies:** 5\
**Last updated:** [June 6, 2008, 3:09am UTC](https://www.ruby-forum.com/t/sql-parser-in-ruby/99607 "2008-06-06T03:09:12Z")

</div>

Has anyone taken the time to bang together an SQL parser for Ruby? Cheers Nic

---

## [Irvars.bat](https://www.ruby-forum.com/t/irvars-bat/139670)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 7\
**Last updated:** [June 6, 2008, 3:03am UTC](https://www.ruby-forum.com/t/irvars-bat/139670 "2008-06-06T03:03:03Z")

</div>

Any problems with this file? It’s what I have so far as the batch file for the SVN vars. jd

---

## [Strange Webrick Error](https://www.ruby-forum.com/t/strange-webrick-error/139661)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 3\
**Last updated:** [June 6, 2008, 2:30am UTC](https://www.ruby-forum.com/t/strange-webrick-error/139661 "2008-06-06T02:30:50Z")

</div>

On some Systems i get a strange Error when accessing a webrick server: An established connection was aborted by the software in your host computer This happens on a Windows XP Sp2 System and a Vista System, but on a …

---

## [Ruby tail](https://www.ruby-forum.com/t/ruby-tail/86440)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 5\
**Last updated:** [June 6, 2008, 1:46am UTC](https://www.ruby-forum.com/t/ruby-tail/86440 "2008-06-06T01:46:56Z")

</div>

Hello, Is there a gem or perhaps a method I am not aware of that does the similar function of tail? Or is there a way to use tail in ruby? I have a file that I want to process as new data is appended to the file. …

---

## [Need help with LOAD\_PATH when embedding jruby](https://www.ruby-forum.com/t/need-help-with-load-path-when-embedding-jruby/139293)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 7\
**Last updated:** [June 6, 2008, 1:23am UTC](https://www.ruby-forum.com/t/need-help-with-load-path-when-embedding-jruby/139293 "2008-06-06T01:23:33Z")

</div>

I am using the JRuby 1.1.2 release. I’ve been working on getting JRuby working as an embedded interpreter in a larger Java system that I’m working with (I’m the ruby guy, not the Java guy). I’ve successfully adapted t…

---

## [Object to XML Converter (and visa versa)](https://www.ruby-forum.com/t/object-to-xml-converter-and-visa-versa/139679)

<div class="topic-metadata">

**Author:** [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Replies:** 0\
**Last updated:** [June 5, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/object-to-xml-converter-and-visa-versa/139679 "2008-06-05T23:43:37Z")

</div>

Hello! Do you now mature Object to XML and XML to Object converter (like the one for YAML)? I’ve checked ‘roxml’ and ‘xml-mapping’ gems, but they both works incorrectly (with complex Object Graph and self-references,…

---

## [Re: Invalid Search Path - Building IronRuby	on	Windows](https://www.ruby-forum.com/t/re-invalid-search-path-building-ironruby-on-windows/139638)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 10\
**Last updated:** [June 5, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/re-invalid-search-path-building-ironruby-on-windows/139638 "2008-06-05T22:44:05Z")

</div>

Something in the build process is trashing that file. Jim - can you send a clean copy of ir.cmd to the list? Note that there are hard coded paths in ir.cmd that we need to generate for the ext layout. John Sent from…

---

## [Price ranges (#164)](https://www.ruby-forum.com/t/price-ranges-164/139665)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 0\
**Last updated:** [June 5, 2008, 10:08pm UTC](https://www.ruby-forum.com/t/price-ranges-164/139665 "2008-06-05T22:08:28Z")

</div>

In this quiz, James presented us with a practical problem that is quite common in everyday life. Sometimes we make such decisions implicitly and “fuzzily”, when we shop at a particular store since another shop “is too…

---

## [System() and \`\` problem in Multithreading](https://www.ruby-forum.com/t/system-and-problem-in-multithreading/139639)

<div class="topic-metadata">

**Author:** [@Lee\_Youser](https://www.ruby-forum.com/u/Lee_Youser)\
**Replies:** 2\
**Last updated:** [June 5, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/system-and-problem-in-multithreading/139639 "2008-06-05T22:00:46Z")

</div>

Hi: I want to execute external routines in my ruby program in a multithreading way and capture the error information occured in external routines into a log file. But when i executed external routines in this way: e…

---

## [Marshalling and serialiing to IO problem](https://www.ruby-forum.com/t/marshalling-and-serialiing-to-io-problem/139654)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [June 5, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/marshalling-and-serialiing-to-io-problem/139654 "2008-06-05T21:51:54Z")

</div>

hello i am trying to serialise a object to file. i have errors when i try to restore the object. any ideas for eg irb(main):009:0\> a=Hash.new =\> {} irb(main):010:0\> a\[1\]=‘key’ =\> “key” irb(main):011:0\> a\[1\]=‘kew’ …

---

## [Rake mspec](https://www.ruby-forum.com/t/rake-mspec/139618)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 4\
**Last updated:** [June 5, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/rake-mspec/139618 "2008-06-05T21:48:18Z")

</div>

Running mspec.rb directly via ir doesn’t work either… D:\\dev\\ruby\\ironruby\\head\\tests\\ironruby\\Specs\>…\\build\\debug\\ir mspec.rb D:\\dev\\ruby\\ironruby\\head\\src\\IronRuby.Libraries\\Builtins\\KernelOps.cs:300:i n \`require’:…

---

## [Accessing a hash in a hash](https://www.ruby-forum.com/t/accessing-a-hash-in-a-hash/139658)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [June 5, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/accessing-a-hash-in-a-hash/139658 "2008-06-05T21:18:15Z")

</div>

Hello, I’m new to Ruby and am trying this example problem. I’m suppose to have a hash key whose value is a hash. Ex. hash\[‘a’\] =\> hash Then, I’m suppose to change the second hash’s keys and values… how do i go about …

---

## [Why cannot i put conditions in when clause](https://www.ruby-forum.com/t/why-cannot-i-put-conditions-in-when-clause/139648)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 6\
**Last updated:** [June 5, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/why-cannot-i-put-conditions-in-when-clause/139648 "2008-06-05T21:16:16Z")

</div>

irb(main):003:0\> case a irb(main):004:1\> when 0 irb(main):005:1\> puts “0” irb(main):006:1\> when \>0 irb(main):007:1\> puts “greater” irb(main):008:1\> end SyntaxError: compile error (irb):6: syntax error, unexpected …

---

## [Problem with ruby + mysql on windows , now trying dbi](https://www.ruby-forum.com/t/problem-with-ruby-mysql-on-windows-now-trying-dbi/139657)

<div class="topic-metadata">

**Author:** [@m4lloc](https://www.ruby-forum.com/u/m4lloc)\
**Replies:** 0\
**Last updated:** [June 5, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/problem-with-ruby-mysql-on-windows-now-trying-dbi/139657 "2008-06-05T20:52:33Z")

</div>

The code(Mysql3.rb): require ‘dbi’ DBI.connect(‘DBI:Mysql:mydb’, ‘my\_user’, ‘my user’) do | dbh | sth = dbh.prepare(“SELECT \* FROM table;”) sth.execute while row = sth.fetch do puts row end end The trouble/probl…

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

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