# Ruby

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

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

---

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

<div class="topic-metadata">

**Author:** [@woow](https://www.ruby-forum.com/u/woow)\
**Replies:** 6\
**Last updated:** [September 17, 2010, 10:23pm UTC](https://www.ruby-forum.com/t/ruby-regexpresion/195154 "2010-09-17T22:23:26Z")

</div>

(21:15:32:873) SMART\>\> Starting Process ‘/abs/nc/qwcy/xyz’. pid 11560 I want to parse the following few things from the above string (21:15:32:873) xyz pid 11560 and output as below, (21:15:32:873), xyz, pid 11560 …

---

## [Regression in jsr223, roadmap?](https://www.ruby-forum.com/t/regression-in-jsr223-roadmap/195074)

<div class="topic-metadata">

**Author:** [@Gergely\_N](https://www.ruby-forum.com/u/Gergely_N)\
**Replies:** 2\
**Last updated:** [September 17, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/regression-in-jsr223-roadmap/195074 "2010-09-17T21:50:05Z")

</div>

Dear Devs, I ran into a regression when upgrading from 1.2.0 to 1.5.2; so I am wondering about the roadmap and whether a fix is coming. It’s a simple one related to the JSR223 interface: this used to work with 1.2.0 …

---

## [More seats on sale today](https://www.ruby-forum.com/t/more-seats-on-sale-today/195023)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 7\
**Last updated:** [September 17, 2010, 9:35pm UTC](https://www.ruby-forum.com/t/more-seats-on-sale-today/195023 "2010-09-17T21:35:26Z")

</div>

Hi all – More tickets for RubyConf will be going on sale today (thanks to some space-juggling). We’re going to sell them for one week or until we run out of room, whichever comes first. Keep an eye on: http://www.rub…

---

## [How to initialize the object of expression?](https://www.ruby-forum.com/t/how-to-initialize-the-object-of-expression/195147)

<div class="topic-metadata">

**Author:** [@imelody](https://www.ruby-forum.com/u/imelody)\
**Replies:** 1\
**Last updated:** [September 17, 2010, 5:59pm UTC](https://www.ruby-forum.com/t/how-to-initialize-the-object-of-expression/195147 "2010-09-17T17:59:26Z")

</div>

Hi, It has a lot of expressions in a file. such as: int\_a = 5, str\_b = “Hello” I want to parse the expressions, so define the object of Parameter. class Parameter def initialize(name,value) @name = name @value = …

---

## [Printing part what's found with a regex](https://www.ruby-forum.com/t/printing-part-whats-found-with-a-regex/195143)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 4\
**Last updated:** [September 17, 2010, 5:19pm UTC](https://www.ruby-forum.com/t/printing-part-whats-found-with-a-regex/195143 "2010-09-17T17:19:02Z")

</div>

Hi everyone, I’m trying to build a program that filters certain lines through regular expressions. In the seconde regular expression I wan to be able to print only what’s within the (\\w+) part of the expression? Ho…

---

## [Gem mysql on windows problem](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000)

<div class="topic-metadata">

**Author:** [@jason\_joo](https://www.ruby-forum.com/u/jason_joo)\
**Replies:** 3\
**Last updated:** [September 17, 2010, 4:07pm UTC](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000 "2010-09-17T16:07:00Z")

</div>

hi guys I used to running ruby apps on ubuntu but someone else would running them on win32. recently I find a problem in gem “mysql” on ruby 1.9.2. I connect, query, query. but it seems that the connection aborts w…

---

## [A problem with Gem](https://www.ruby-forum.com/t/a-problem-with-gem/195113)

<div class="topic-metadata">

**Author:** [@Zark\_Yoc](https://www.ruby-forum.com/u/Zark_Yoc)\
**Replies:** 4\
**Last updated:** [September 17, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113 "2010-09-17T15:30:44Z")

</div>

I’m download the Ruby version 1.9.2-p0,and compile and install it,on /usr/local/. after the finish , i type the “gem install merb” or “gem install list” show an error. like this: ironbook:/home/zark/download/zlib-1…

---

## [Use of ? in variable names](https://www.ruby-forum.com/t/use-of-in-variable-names/129321)

<div class="topic-metadata">

**Author:** [@michaelb](https://www.ruby-forum.com/u/michaelb)\
**Replies:** 9\
**Last updated:** [September 17, 2010, 3:26pm UTC](https://www.ruby-forum.com/t/use-of-in-variable-names/129321 "2010-09-17T15:26:30Z")

</div>

Hello everyone: Why can’t I name boolean variables with a “?” on the end? The “?” can be used on the end of methods but not variable. Here is an example: This naming convention works with “?” def boolean\_method? re…

---

## [Prawn table cell too tall](https://www.ruby-forum.com/t/prawn-table-cell-too-tall/195139)

<div class="topic-metadata">

**Author:** [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Replies:** 0\
**Last updated:** [September 17, 2010, 3:25pm UTC](https://www.ruby-forum.com/t/prawn-table-cell-too-tall/195139 "2010-09-17T15:25:05Z")

</div>

Hi, I have a problem with Prawn::table::cell, when the cell is too tall, Prawn will move the complete row to the next page, and left the last page with a lot of un-used spaces. Can Prawn split the cell when it reach t…

---

## [Sequel (load error) - used in production PC](https://www.ruby-forum.com/t/sequel-load-error-used-in-production-pc/195131)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 0\
**Last updated:** [September 17, 2010, 12:49pm UTC](https://www.ruby-forum.com/t/sequel-load-error-used-in-production-pc/195131 "2010-09-17T12:49:55Z")

</div>

I’ve got my development PC and all programs work. Now I’ve copied the directories across to another PC (both running Kubuntu 10.04) Can’t get the dam production code to work on new PC!!! Know it’s all down to paths e…

---

## [HTTP client to post XML RAW\_DATA to restful API](https://www.ruby-forum.com/t/http-client-to-post-xml-raw-data-to-restful-api/195077)

<div class="topic-metadata">

**Author:** [@cnicolaou](https://www.ruby-forum.com/u/cnicolaou)\
**Replies:** 3\
**Last updated:** [September 17, 2010, 9:23am UTC](https://www.ruby-forum.com/t/http-client-to-post-xml-raw-data-to-restful-api/195077 "2010-09-17T09:23:19Z")

</div>

Hey I am trying to find out how to send an XML in string as RAW\_DATA to a RESTful API. I found out a couple of libraries (Nestful, Restfulclient, curb) but wasn’t able to send the content properly as you’d send it fr…

---

## [Using translation variable in link\_to](https://www.ruby-forum.com/t/using-translation-variable-in-link-to/195066)

<div class="topic-metadata">

**Author:** [@arunachandu](https://www.ruby-forum.com/u/arunachandu)\
**Replies:** 3\
**Last updated:** [September 17, 2010, 7:30am UTC](https://www.ruby-forum.com/t/using-translation-variable-in-link-to/195066 "2010-09-17T07:30:35Z")

</div>

HI , In ROR , i m having a line like \<%= link\_to("NAME (#{@name})", user\_path(@user, :in =\> :s)) %\> i want to change the string NAME to t(:str\_name) … how to change it . when i change it , i am getting errors…

---

## [Twitter script since oAuth](https://www.ruby-forum.com/t/twitter-script-since-oauth/195114)

<div class="topic-metadata">

**Author:** [@jefers](https://www.ruby-forum.com/u/jefers)\
**Replies:** 1\
**Last updated:** [September 17, 2010, 7:06am UTC](https://www.ruby-forum.com/t/twitter-script-since-oauth/195114 "2010-09-17T07:06:39Z")

</div>

I had a script working with basic authinecation pulling from out local database and sending updates to twitter, about 12 a month. Not any crazy traffic. Since Aug 31st they turned off basic authineciton. Ive tried …

---

## [Undefined local variable or method '\_FILE\_'](https://www.ruby-forum.com/t/undefined-local-variable-or-method-file/195111)

<div class="topic-metadata">

**Author:** [@metanolbr](https://www.ruby-forum.com/u/metanolbr)\
**Replies:** 2\
**Last updated:** [September 17, 2010, 6:09am UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-file/195111 "2010-09-17T06:09:18Z")

</div>

Hi all, Don’t know why but when I try to use the FILE variable I’m getting the following error: irb(main):001:0\> puts File.dirname(FILE) NameError: undefined local variable or method \`FILE’ for main:Object from (irb…

---

## [Running a .rb file under Windows (beginner's question)](https://www.ruby-forum.com/t/running-a-rb-file-under-windows-beginners-question/195094)

<div class="topic-metadata">

**Author:** [@hbuckler](https://www.ruby-forum.com/u/hbuckler)\
**Replies:** 5\
**Last updated:** [September 17, 2010, 5:07am UTC](https://www.ruby-forum.com/t/running-a-rb-file-under-windows-beginners-question/195094 "2010-09-17T05:07:50Z")

</div>

I just installed Ruby on a Windows XP machine. At the start of the path is: C:\\Ruby192\\bin; I created C:\\Documents and Settings\\brazee\\My Documents\\Code\\Ruby\\Hello.rb How do I run it? When I look at it in explor…

---

## [Ruby IDE for Windows](https://www.ruby-forum.com/t/ruby-ide-for-windows/195108)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 8\
**Last updated:** [September 17, 2010, 4:38am UTC](https://www.ruby-forum.com/t/ruby-ide-for-windows/195108 "2010-09-17T04:38:34Z")

</div>

I’ve looked at quite a few IDE’s (or editors) for Ruby on Windows, but seem quite unimpressed by them. I’ve tried Netbeans, RadRails, IntelliJ, Redcar and others. I’m yet to find an editor that does basic code complet…

---

## [NP-Hard Geolocatoin Problem](https://www.ruby-forum.com/t/np-hard-geolocatoin-problem/195102)

<div class="topic-metadata">

**Author:** [@jrgutier](https://www.ruby-forum.com/u/jrgutier)\
**Replies:** 3\
**Last updated:** [September 17, 2010, 4:05am UTC](https://www.ruby-forum.com/t/np-hard-geolocatoin-problem/195102 "2010-09-17T04:05:47Z")

</div>

I am trying to create a program that maximizes the distances of addresses in Y amount of groups, essentially trying to decrease the chance that you are in the same group as your neighbors. Here is an example n it’s si…

---

## [Net::PingExternal gives an errror](https://www.ruby-forum.com/t/net-pingexternal-gives-an-errror/195084)

<div class="topic-metadata">

**Author:** [@webwizart](https://www.ruby-forum.com/u/webwizart)\
**Replies:** 5\
**Last updated:** [September 17, 2010, 12:26am UTC](https://www.ruby-forum.com/t/net-pingexternal-gives-an-errror/195084 "2010-09-17T00:26:52Z")

</div>

Hello there, I’m having a problem with a tutorial to ping whatever. I have snowleopard and both ruby’s both give the same error: uninitialized constant Net::PingExternal (NameError) here is the code i’m using: requi…

---

## [Traversing a friend graph - the ruby way?](https://www.ruby-forum.com/t/traversing-a-friend-graph-the-ruby-way/195099)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 1\
**Last updated:** [September 16, 2010, 8:56pm UTC](https://www.ruby-forum.com/t/traversing-a-friend-graph-the-ruby-way/195099 "2010-09-16T20:56:06Z")

</div>

Recently, I needed to write some code to traverse friend graphs on my website. Due to my C++ background, I used recursion: def traverse(user, depth, origin=nil) @hi5 = Hi5fbapi.new @api\_key, @secret if depth \> 0 fr…

---

## [Connect to IBM\_DB with rubyscript2exe](https://www.ruby-forum.com/t/connect-to-ibm-db-with-rubyscript2exe/194796)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 2\
**Last updated:** [September 16, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/connect-to-ibm-db-with-rubyscript2exe/194796 "2010-09-16T20:24:26Z")

</div>

I have a ruby script that can connect to an IBM\_DB database and gather all the necessary information for my script to run, but once i use rubyscript2exe to create a .exe of the script it keeps saying that my database …

---

## [How the regular expression to match "//"?](https://www.ruby-forum.com/t/how-the-regular-expression-to-match/195081)

<div class="topic-metadata">

**Author:** [@imelody](https://www.ruby-forum.com/u/imelody)\
**Replies:** 3\
**Last updated:** [September 16, 2010, 4:36pm UTC](https://www.ruby-forum.com/t/how-the-regular-expression-to-match/195081 "2010-09-16T16:36:47Z")

</div>

In C/C++ language, can use “//” to comment,such as "//i++ " I want use ruby to distinguish the comment lines and code lines. but fail. : ( f.each do|line| puts line if line =~ /^////.\*/ puts “The line contain //.” …

---

## [\[ANN\] ruby-sendfile 0.9.1](https://www.ruby-forum.com/t/ann-ruby-sendfile-0-9-1/87329)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [September 16, 2010, 4:15pm UTC](https://www.ruby-forum.com/t/ann-ruby-sendfile-0-9-1/87329 "2010-09-16T16:15:03Z")

</div>

As promised, I’ve updated ruby-sendfile to make it more “1.0”. There is a source tarball and gem up on Rubyforge, whichever you prefer. I’ve also added unit tests to make sure that full and partial sends work on both …

---

## [What OS do you use for Ruby development?](https://www.ruby-forum.com/t/what-os-do-you-use-for-ruby-development/194580)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 66\
**Last updated:** [September 16, 2010, 3:48pm UTC](https://www.ruby-forum.com/t/what-os-do-you-use-for-ruby-development/194580 "2010-09-16T15:48:47Z")

</div>

I don’t want to start any OS wars. I was just curious as to what OS you prefer to run/code ruby in. If you run \*nix, what distro? Thanks, -Nick

---

## [Def swfupload\_file=(data)](https://www.ruby-forum.com/t/def-swfupload-file-data/195079)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 2\
**Last updated:** [September 16, 2010, 3:13pm UTC](https://www.ruby-forum.com/t/def-swfupload-file-data/195079 "2010-09-16T15:13:41Z")

</div>

Following this tutorial: http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/ I want to ask about this method definition: def swfupload\_file=(data) What is meant by the =(data) part? Thanks.

---

## [How best to include paths to ruby 1.8.7?](https://www.ruby-forum.com/t/how-best-to-include-paths-to-ruby-1-8-7/195072)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 0\
**Last updated:** [September 16, 2010, 11:50am UTC](https://www.ruby-forum.com/t/how-best-to-include-paths-to-ruby-1-8-7/195072 "2010-09-16T11:50:39Z")

</div>

I have a set of scripts working on my development linux PC. I’ve moved these scripts to another linux PC - This will be a production machine. This is the first time I’ve done this at all! Looking for direction on how…

---

## [Best method to use TCPSocket](https://www.ruby-forum.com/t/best-method-to-use-tcpsocket/195057)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 1\
**Last updated:** [September 16, 2010, 10:01am UTC](https://www.ruby-forum.com/t/best-method-to-use-tcpsocket/195057 "2010-09-16T10:01:01Z")

</div>

Hello, I’m having an issue getting an expected response via TCPSocket. My goal is to connect to a remote controller device and access XML data. The following code properly authenticates a connection, however I am not …

---

## [Rspec and autotest problems](https://www.ruby-forum.com/t/rspec-and-autotest-problems/195049)

<div class="topic-metadata">

**Author:** [@htenchev](https://www.ruby-forum.com/u/htenchev)\
**Replies:** 3\
**Last updated:** [September 16, 2010, 9:51am UTC](https://www.ruby-forum.com/t/rspec-and-autotest-problems/195049 "2010-09-16T09:51:36Z")

</div>

Hello. I am running rails 3. I installed the rails gem. (OS Win7 64bit) When I run rspec the command is not recognized, I could find it in the ruby/bin folder as well. When I run autotest on a sample app (the one fro…

---

## [Access super from yield block?](https://www.ruby-forum.com/t/access-super-from-yield-block/195048)

<div class="topic-metadata">

**Author:** [@mydarkpassenger](https://www.ruby-forum.com/u/mydarkpassenger)\
**Replies:** 7\
**Last updated:** [September 16, 2010, 8:20am UTC](https://www.ruby-forum.com/t/access-super-from-yield-block/195048 "2010-09-16T08:20:58Z")

</div>

Is there a way to access super from a yield block?

---

## [Get the beginning of the hour and the end of the hour](https://www.ruby-forum.com/t/get-the-beginning-of-the-hour-and-the-end-of-the-hour/195055)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 4\
**Last updated:** [September 16, 2010, 2:03am UTC](https://www.ruby-forum.com/t/get-the-beginning-of-the-hour-and-the-end-of-the-hour/195055 "2010-09-16T02:03:21Z")

</div>

I would like to Get the beginning of the current hour and the end of the current hour in the regular time format Wed Sep 15 15:45:47 -0600 2010 I would like to get Wed Sep 15 15:00:00 -0600 2010 and Wed Sep 15 15:59:5…

---

## [\[ANN\] Germany.rb 2010, September 18th and 19th in Leipzig](https://www.ruby-forum.com/t/ann-germany-rb-2010-september-18th-and-19th-in-leipzig/195060)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 0\
**Last updated:** [September 16, 2010, 1:59am UTC](https://www.ruby-forum.com/t/ann-germany-rb-2010-september-18th-and-19th-in-leipzig/195060 "2010-09-16T01:59:07Z")

</div>

Dear Rubyists, We’d like to invite you to the first Germany.rb in Leipzig on the 18th and 19th of September 2010. This is a quite spontaneous community driven Ruby event. We skip the call for proposal part and jump di…

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

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