# Ruby

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

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

---

## [Confused by this simple regular expressions behaviour](https://www.ruby-forum.com/t/confused-by-this-simple-regular-expressions-behaviour/146452)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 7\
**Last updated:** [August 21, 2008, 1:06pm UTC](https://www.ruby-forum.com/t/confused-by-this-simple-regular-expressions-behaviour/146452 "2008-08-21T13:06:29Z")

</div>

why does this regexpression match \\w+\\d+ match 68 in this “1/8 Fender '68 TELECASTER Miniature(Pink Paisley)\[RARE\]”, ive told it to at least match one letter before it matches any numbers??? (i dont actually want i…

---

## [validation-Urgent](https://www.ruby-forum.com/t/validation-urgent/146466)

<div class="topic-metadata">

**Author:** [@hemantaray](https://www.ruby-forum.com/u/hemantaray)\
**Replies:** 0\
**Last updated:** [August 21, 2008, 1:00pm UTC](https://www.ruby-forum.com/t/validation-urgent/146466 "2008-08-21T13:00:10Z")

</div>

I have written a validation in user model like validates\_format\_of :password, :with =\> /^(?=.\\d)(?=.(\[a-z\]|\[A-Z\])){6,20}$/, :message =\> “Password wrong” and also validates\_presence\_of :name and to get the message w…

---

## [Curses replacement for JRuby?](https://www.ruby-forum.com/t/curses-replacement-for-jruby/146467)

<div class="topic-metadata">

**Author:** [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Replies:** 0\
**Last updated:** [August 21, 2008, 12:56pm UTC](https://www.ruby-forum.com/t/curses-replacement-for-jruby/146467 "2008-08-21T12:56:23Z")

</div>

Hello Is there some replacement for Curses in JRuby? All I really want is the ability to tell how large is my terminal. The Ruby Curses extension is useless for writing text on the terminal anyway, at least for text …

---

## [Marshaling an object destroys dynamically created methods](https://www.ruby-forum.com/t/marshaling-an-object-destroys-dynamically-created-methods/146344)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 3\
**Last updated:** [August 21, 2008, 12:45pm UTC](https://www.ruby-forum.com/t/marshaling-an-object-destroys-dynamically-created-methods/146344 "2008-08-21T12:45:14Z")

</div>

I noticed this this afternoon: Unmarshaling a marshaled object, makes all dynamically created methods private. #Here’s a class that dynamically creates the method MyPage#print() class MyPage def initialize MyPage.c…

---

## [String functions](https://www.ruby-forum.com/t/string-functions/146455)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 3\
**Last updated:** [August 21, 2008, 11:10am UTC](https://www.ruby-forum.com/t/string-functions/146455 "2008-08-21T11:10:07Z")

</div>

I have string. In that i need to display the first element from String means Which Function Should I use? I Am Unable To Figure Out…

---

## [Array of hashes - need to iterate and calulate stats but how](https://www.ruby-forum.com/t/array-of-hashes-need-to-iterate-and-calulate-stats-but-how/146373)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 18\
**Last updated:** [August 21, 2008, 10:37am UTC](https://www.ruby-forum.com/t/array-of-hashes-need-to-iterate-and-calulate-stats-but-how/146373 "2008-08-21T10:37:23Z")

</div>

I making a script which generates some basic stats for completed listings on ebay. Its merely a means to improve on my ruby so its pretty primitive :wink: I have an array of hashes. Each hash represents a listing on e…

---

## [Grabbing Text From a Website](https://www.ruby-forum.com/t/grabbing-text-from-a-website/146447)

<div class="topic-metadata">

**Author:** [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Replies:** 1\
**Last updated:** [August 21, 2008, 10:22am UTC](https://www.ruby-forum.com/t/grabbing-text-from-a-website/146447 "2008-08-21T10:22:40Z")

</div>

Let’s say I wanted to make a program that traversed all 125 products on this page:http://www.menshealth.com/eatthis/Best-Grocery-Foods/, grabbed the text from each one, and compiled them into a list in a text file. Fi…

---

## [Img (regular expressions](https://www.ruby-forum.com/t/img-regular-expressions/146446)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 3\
**Last updated:** [August 21, 2008, 10:20am UTC](https://www.ruby-forum.com/t/img-regular-expressions/146446 "2008-08-21T10:20:54Z")

</div>

Hi All… I Need to Extract Img tag Using Regular Expressions From The Html Page \<\\simg \[^\>\]src\\s=\\s(\["’\])(.\*?)\\1 Is This Code Would be ok if So How it can Be Implemented? Any Ideas??

---

## [Validation](https://www.ruby-forum.com/t/validation/146439)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [August 21, 2008, 10:05am UTC](https://www.ruby-forum.com/t/validation/146439 "2008-08-21T10:05:40Z")

</div>

Hi all…i am newb for rails as well as ruby I have Column called Description In My Table. I would Like to Validate That Description Column. That is It Should Only Contain Texts Not Images. What Do I DO With Using Regu…

---

## [Each, stuck up](https://www.ruby-forum.com/t/each-stuck-up/146448)

<div class="topic-metadata">

**Author:** [@Mayuresh\_K](https://www.ruby-forum.com/u/Mayuresh_K)\
**Replies:** 2\
**Last updated:** [August 21, 2008, 9:30am UTC](https://www.ruby-forum.com/t/each-stuck-up/146448 "2008-08-21T09:30:30Z")

</div>

Hello, A while back there was this discussion about what code could crash irb I did the following in irb 1.9; a = \[3, 2, 1, 0, -1, -2, -3\] a.each {|x| a\[x\] = x +1} irb just got stuck, it wouldn’t do anything for a w…

---

## [GrowlNotifier 1.0.1](https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370)

<div class="topic-metadata">

**Author:** [@Satoshi\_N](https://www.ruby-forum.com/u/Satoshi_N)\
**Replies:** 2\
**Last updated:** [August 21, 2008, 8:21am UTC](https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370 "2008-08-21T08:21:41Z")

</div>

Growl Notifier 1.0.1 has been released. http://rubyforge.org/projects/growlnotifier/ http://growlnotifier.rubyforge.org/ Growl Notifier allows your application to post Growl notifications. It can then receive clicked…

---

## [Mechanize problem, cant require nor install](https://www.ruby-forum.com/t/mechanize-problem-cant-require-nor-install/146268)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [August 21, 2008, 7:43am UTC](https://www.ruby-forum.com/t/mechanize-problem-cant-require-nor-install/146268 "2008-08-21T07:43:38Z")

</div>

Hi Im following the simple mechanize tutorial on http://ruby-doc.org/core/ i fire up irb then type and see the following irb(main):001:0\> require ‘rubygems’ =\> true irb(main):002:0\> require ‘mechanize’ LoadError: …

---

## [Unintuitive language feature (exclamation functions)](https://www.ruby-forum.com/t/unintuitive-language-feature-exclamation-functions/146419)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 19\
**Last updated:** [August 21, 2008, 6:20am UTC](https://www.ruby-forum.com/t/unintuitive-language-feature-exclamation-functions/146419 "2008-08-21T06:20:54Z")

</div>

I was surprised to discover that the code astring.sub!(/hi/, 'bye') behaves subtly differently from astring = astring.sub(/hi/, 'bye') Intuitively, to me, these should be identical. Perhaps the documentation should …

---

## [BDD and TDD - What are they for?](https://www.ruby-forum.com/t/bdd-and-tdd-what-are-they-for/145993)

<div class="topic-metadata">

**Author:** [@Clinton\_DSJudy](https://www.ruby-forum.com/u/Clinton_DSJudy)\
**Replies:** 41\
**Last updated:** [August 21, 2008, 5:28am UTC](https://www.ruby-forum.com/t/bdd-and-tdd-what-are-they-for/145993 "2008-08-21T05:28:16Z")

</div>

I’d like someone to give me very basic reasons for why I need Behavior Driven Development (BDD, see RSpec) and/or Test Driven Development (TDD, See Test::Unit). I’m a fairly competent programmer. I think I use what th…

---

## [Can Someone Explain This to Me?](https://www.ruby-forum.com/t/can-someone-explain-this-to-me/146348)

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 2\
**Last updated:** [August 21, 2008, 4:15am UTC](https://www.ruby-forum.com/t/can-someone-explain-this-to-me/146348 "2008-08-21T04:15:12Z")

</div>

class Body @feet = 2 puts “We have #{@feet} feet” def initialize end def report puts “We have #{@feet} feet” end end b=Body.new b.report Why is it in the above class the first puts prints correctly but the se…

---

## [RubyConf proposals due by Thursday!](https://www.ruby-forum.com/t/rubyconf-proposals-due-by-thursday/146337)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 2\
**Last updated:** [August 21, 2008, 2:31am UTC](https://www.ruby-forum.com/t/rubyconf-proposals-due-by-thursday/146337 "2008-08-21T02:31:40Z")

</div>

Hi everyone – Don’t forget to submit your RubyConf presentation proposal by August 21! The conference website is: http://2008.rubyconf.org, and there’s a tab for proposals. Thanks! David

---

## [\[ANN\] Ruby Hoedown 2008 Videos Now Live](https://www.ruby-forum.com/t/ann-ruby-hoedown-2008-videos-now-live/146435)

<div class="topic-metadata">

**Author:** [@doncarlosx](https://www.ruby-forum.com/u/doncarlosx)\
**Replies:** 0\
**Last updated:** [August 21, 2008, 2:00am UTC](https://www.ruby-forum.com/t/ann-ruby-hoedown-2008-videos-now-live/146435 "2008-08-21T02:00:29Z")

</div>

We just got finished uploading the last of the videos from Ruby Hoedown 2008: Get 'em while they’re hot. This was a fun conference, held in humid Huntsville, Alabama. As one of the main organizers, Jeremy McAnally …

---

## [Sorting of strings is different in IronRuby than in Ruby](https://www.ruby-forum.com/t/sorting-of-strings-is-different-in-ironruby-than-in-ruby/146358)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 1\
**Last updated:** [August 21, 2008, 1:27am UTC](https://www.ruby-forum.com/t/sorting-of-strings-is-different-in-ironruby-than-in-ruby/146358 "2008-08-21T01:27:56Z")

</div>

Hi I was playing around with a very simple code example and got different results in IronRuby and in Ruby. “IronRuby In Action”.split(//).sort.uniq.join returns in MRI: " AIRbcinortuy" returns in IronRuby: " AbciIno…

---

## [One more Deaf Grandma topic](https://www.ruby-forum.com/t/one-more-deaf-grandma-topic/146312)

<div class="topic-metadata">

**Author:** [@chipsbgz](https://www.ruby-forum.com/u/chipsbgz)\
**Replies:** 3\
**Last updated:** [August 21, 2008, 1:16am UTC](https://www.ruby-forum.com/t/one-more-deaf-grandma-topic/146312 "2008-08-21T01:16:15Z")

</div>

Obviously, I’m working through Chris P.'s Learn to Program, and I’m having issues with deaf Grandma. I’m new to programming (hence why I’m reading Learn to Program), and I’ve gotten as far as getting the program to re…

---

## ['Try Ruby' (hobix.com) - Bad Gateway Error?](https://www.ruby-forum.com/t/try-ruby-hobix-com-bad-gateway-error/146244)

<div class="topic-metadata">

**Author:** [@goneale](https://www.ruby-forum.com/u/goneale)\
**Replies:** 3\
**Last updated:** [August 21, 2008, 12:37am UTC](https://www.ruby-forum.com/t/try-ruby-hobix-com-bad-gateway-error/146244 "2008-08-21T00:37:10Z")

</div>

Hi Guys, I am receiving an error on http://tryruby.hobix.com/ just with the Try Ruby in your browser facility, is everyone receiving the same error: Interactive ruby ready. help 2 + 5 502 Bad Gateway 502 Bad …

---

## [Automatic Install JRE](https://www.ruby-forum.com/t/automatic-install-jre/146391)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 3\
**Last updated:** [August 21, 2008, 12:05am UTC](https://www.ruby-forum.com/t/automatic-install-jre/146391 "2008-08-21T00:05:27Z")

</div>

What options, if any, are there for automatic detection and install or update of the JRE? Perhaps with a ruby script. If not, it is probably time to think about writing one :smiley: Thanks Paul F. To unsubscribe f…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/146430)

<div class="topic-metadata">

**Author:** [@Cedric\_Allam](https://www.ruby-forum.com/u/Cedric_Allam)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/no-subject/146430 "2008-08-20T23:46:44Z")

</div>

unsubscribe Cedric Allam

---

## [\[Ruby 1.9 - Feature #108\] (Open) strftimeã®usecå¯¾å¿œ](https://www.ruby-forum.com/t/ruby-1-9-feature-108-open-strftimea-useca-a-oe/139745)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 11:31pm UTC](https://www.ruby-forum.com/t/ruby-1-9-feature-108-open-strftimea-useca-a-oe/139745 "2008-08-20T23:31:29Z")

</div>

Issue #108 has been reported by Kazuhiro NISHIYAMA. Feature #108: strftimeã®usecå¯¾å¿œ http://redmine.ruby-lang.org/issues/show/108 Author: Kazuhiro NISHIYAMA Status: Open Priority: Normal Assigned to: Category: …

---

## [Time, Date o DateTime?](https://www.ruby-forum.com/t/time-date-o-datetime/146427)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 11:16pm UTC](https://www.ruby-forum.com/t/time-date-o-datetime/146427 "2008-08-20T23:16:50Z")

</div>

Hi, could someone please explain which is the best option? I assume they are redundant, but it’s strange all are part of Ruby core. It’s confussing. Thanks for any clarification.

---

## [Nginx + Glassfish breaks HTTP Headers?](https://www.ruby-forum.com/t/nginx-glassfish-breaks-http-headers/146283)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/nginx-glassfish-breaks-http-headers/146283 "2008-08-20T23:02:12Z")

</div>

I tried the following combinations Nginx + Mongrel (MRI) Nginx + Mongrel (Jruby) Nginx + Glassfish Gem Glassfish Gem Basically for 1), 2) and 3) I use Nginx to service static files and Mongrel/Glassfish to service ra…

---

## [Dynamically Create Class. (or. Why is eval() messy?)](https://www.ruby-forum.com/t/dynamically-create-class-or-why-is-eval-messy/146423)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 10:47pm UTC](https://www.ruby-forum.com/t/dynamically-create-class-or-why-is-eval-messy/146423 "2008-08-20T22:47:39Z")

</div>

Hi, I’m trying to create a utility method that will automatically create a class for me, given a classname. But I can’t find a way around having to use eval(). This is what I’m doing right now: def createClass(class…

---

## [Add e method "inline" to an object?](https://www.ruby-forum.com/t/add-e-method-inline-to-an-object/146409)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/add-e-method-inline-to-an-object/146409 "2008-08-20T22:39:19Z")

</div>

Hi, I know that I can extend a Class instance (an object) with a method(s) by doing: object.extend Module but can I do it in a “inline” way without the need of a module? I just want something as follows: time = Time…

---

## [Code Review: gets-1](https://www.ruby-forum.com/t/code-review-gets-1/146417)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/code-review-gets-1/146417 "2008-08-20T21:02:35Z")

</div>

tfpt review “/shelveset:gets-1;REDMOND\\jflam” Comment : Fixes rubyforge bug #21342 - “gets” broken Adds code to test for closed streams Adds tainting to input returned from gets Adjusts input line correctly in # Ruby…

---

## [ActiveRecord Question -- making arrays or hashs out of database tables](https://www.ruby-forum.com/t/activerecord-question-making-arrays-or-hashs-out-of-database-tables/146413)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 8:58pm UTC](https://www.ruby-forum.com/t/activerecord-question-making-arrays-or-hashs-out-of-database-tables/146413 "2008-08-20T20:58:45Z")

</div>

Hi, I have a question about using ActiveRecord.Â The way I understand ActiveRecord is that you can use it as a kind of bridge between Ruby and a relational database.Â I believe that you can use it to create objects …

---

## [Jruby and gems](https://www.ruby-forum.com/t/jruby-and-gems/146399)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 13\
**Last updated:** [August 20, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/jruby-and-gems/146399 "2008-08-20T19:55:43Z")

</div>

Dear all, I am having trouble loading a gem in Jruby, Ubuntu 8.04 persistently says it can’t find it: /usr/local/jruby-1.1.3/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in \`require’: no such file to load – p…

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

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