# Ruby

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

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

---

## [Dividing by two and rounding up](https://www.ruby-forum.com/t/dividing-by-two-and-rounding-up/123441)

<div class="topic-metadata">

**Author:** [@tomn](https://www.ruby-forum.com/u/tomn)\
**Replies:** 15\
**Last updated:** [December 18, 2007, 12:07am UTC](https://www.ruby-forum.com/t/dividing-by-two-and-rounding-up/123441 "2007-12-18T00:07:01Z")

</div>

Hey all…I am hoping for a tip I have a table I want to lay out dynamcially in rails where if a game has 6 periods the first 3 periods will be in the first column and the 4-6 in the second column. If someone picks an …

---

## [I need a list of advantages](https://www.ruby-forum.com/t/i-need-a-list-of-advantages/123446)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [December 17, 2007, 11:57pm UTC](https://www.ruby-forum.com/t/i-need-a-list-of-advantages/123446 "2007-12-17T23:57:04Z")

</div>

does anyone have a list of advantages this language provides ?

---

## [At\_exit in C extension](https://www.ruby-forum.com/t/at-exit-in-c-extension/123408)

<div class="topic-metadata">

**Author:** [@jandrake](https://www.ruby-forum.com/u/jandrake)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/at-exit-in-c-extension/123408 "2007-12-17T23:17:15Z")

</div>

Hello, For ruby 1.8 i used registering at\_exit in C via eval (quite hackish i know) as in: void Init\_Mymodule() { … module = rb\_define\_module(“Mymodule”); rb\_define\_module\_function(module,“myfunc”, … … rb\_eval\_…

---

## [Constant Resolution Confusion](https://www.ruby-forum.com/t/constant-resolution-confusion/123434)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 3\
**Last updated:** [December 17, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/constant-resolution-confusion/123434 "2007-12-17T20:59:17Z")

</div>

I was surprised by the following this weekend: module Foo module Bar; end class Whee1 include Bar end end All is well class Foo::Whee2 include Bar end #=\> uninitialized constant Foo::Whee2::Bar (NameError) Is …

---

## [Backslashes in Command Line Arguments](https://www.ruby-forum.com/t/backslashes-in-command-line-arguments/123305)

<div class="topic-metadata">

**Author:** [@bogojoker](https://www.ruby-forum.com/u/bogojoker)\
**Replies:** 12\
**Last updated:** [December 17, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/backslashes-in-command-line-arguments/123305 "2007-12-17T19:52:20Z")

</div>

In writing a script that takes strings on the command line I have run into a small problem which I don’t see any way around. Here is a very simplified program that just prints out the first command line argument, and…

---

## [Teams -\> members -\> users](https://www.ruby-forum.com/t/teams-members-users/123341)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 10\
**Last updated:** [December 17, 2007, 7:31pm UTC](https://www.ruby-forum.com/t/teams-members-users/123341 "2007-12-17T19:31:48Z")

</div>

trying to work this out, giving me a headache, basically i’ve got a data structure where you have teams, members and users. each team can have many members, each member has one user, and is assigned to one team, cl…

---

## [Utility Belt 1.0.6 - Rails bug workaround](https://www.ruby-forum.com/t/utility-belt-1-0-6-rails-bug-workaround/123375)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 5\
**Last updated:** [December 17, 2007, 6:48pm UTC](https://www.ruby-forum.com/t/utility-belt-1-0-6-rails-bug-workaround/123375 "2007-12-17T18:48:57Z")

</div>

Hi all, 24 hours has elapsed, so it’s time for another release of Utility Belt! In this episode, our intrepid heroes discover a shocking secret! Rails has a bug which clashes with Utility Belt: http://gilesbowkett.bl…

---

## [Hot Job Search](https://www.ruby-forum.com/t/hot-job-search/123430)

<div class="topic-metadata">

**Author:** [@ta5e8yl7](https://www.ruby-forum.com/u/ta5e8yl7)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 6:46pm UTC](https://www.ruby-forum.com/t/hot-job-search/123430 "2007-12-17T18:46:36Z")

</div>

Nice site with tons of resources available.I found the Hot Job Section at http://www.2getemployment.com very useful for anyone looking for a new job.

---

## [Inheritance and meta-classes](https://www.ruby-forum.com/t/inheritance-and-meta-classes/122953)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 7\
**Last updated:** [December 17, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/inheritance-and-meta-classes/122953 "2007-12-17T17:14:34Z")

</div>

Hi all, OK. I’m trying to work out where a method is defined in Rails. It’s in a test, and the specific function that’s being called is ‘post’, but my question is not a Rails question, it’s Ruby. How do I find where …

---

## [Leopard rails 2.0 hell](https://www.ruby-forum.com/t/leopard-rails-2-0-hell/123301)

<div class="topic-metadata">

**Author:** [@james](https://www.ruby-forum.com/u/james)\
**Replies:** 4\
**Last updated:** [December 17, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/leopard-rails-2-0-hell/123301 "2007-12-17T17:08:07Z")

</div>

I did something very silly tonight that I am now paying dearly for!! I updated my installation of rails on OS 10.5 leopard and broke the entire rails stack on this machine. Thank god I have a laptop which I hadn’t upg…

---

## [\[trunk/r14273\] File.mkdir() -\> Dir.mkdir() in enc/make\_encma](https://www.ruby-forum.com/t/trunk-r14273-file-mkdir-dir-mkdir-in-enc-make-encma/123426)

<div class="topic-metadata">

**Author:** [@keltia](https://www.ruby-forum.com/u/keltia)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/trunk-r14273-file-mkdir-dir-mkdir-in-enc-make-encma/123426 "2007-12-17T16:48:48Z")

</div>

There is a typo in enc/make\_encmake.rb where File.mkdir is used instead of Dir.mkdir. Cheers, Ollivier.

---

## [Markaby Problem](https://www.ruby-forum.com/t/markaby-problem/123419)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/markaby-problem/123419 "2007-12-17T16:25:17Z")

</div>

Hey! I’d like to render a unnumbered list using the markaby gem. this list needs to hold links. I’ve tried the following: markaby.ul :id =\>‘mainnavigation’ do items.each do |item| li a :id=\> item end end But i…

---

## [Using sql compact from ruby](https://www.ruby-forum.com/t/using-sql-compact-from-ruby/123423)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/using-sql-compact-from-ruby/123423 "2007-12-17T15:45:50Z")

</div>

Does anyone have any experience using Sql Compact with Ruby. I tried the following code require ‘dbi’ @server\_name=‘C:/Temp/F1Backup.sdf’ @dbh=DBI.connect(“DBI:ADO:Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=#{@…

---

## [Gem path problem in MAC OS](https://www.ruby-forum.com/t/gem-path-problem-in-mac-os/123421)

<div class="topic-metadata">

**Author:** [@Kosmo](https://www.ruby-forum.com/u/Kosmo)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/gem-path-problem-in-mac-os/123421 "2007-12-17T15:37:30Z")

</div>

I have installed ruby and gems long time ago using the tutorial in the first edition of Pragmatic Programmers Agile Web D. With Rails. My Rails applications work fine, but when I install new gems they go to /usr/loca…

---

## [File Modification Monitor](https://www.ruby-forum.com/t/file-modification-monitor/123219)

<div class="topic-metadata">

**Author:** [@jlimited](https://www.ruby-forum.com/u/jlimited)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 3:33pm UTC](https://www.ruby-forum.com/t/file-modification-monitor/123219 "2007-12-17T15:33:58Z")

</div>

Hello, I am new to ruby. I have a thrid party application that stores configuration settings in an ASCII/TEXT file. I need to map each function within the application to what lines it modifies in the text file. Ev…

---

## [Help using ruby/dl to pass LPDWORD](https://www.ruby-forum.com/t/help-using-ruby-dl-to-pass-lpdword/123412)

<div class="topic-metadata">

**Author:** [@mshah](https://www.ruby-forum.com/u/mshah)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 2:03pm UTC](https://www.ruby-forum.com/t/help-using-ruby-dl-to-pass-lpdword/123412 "2007-12-17T14:03:37Z")

</div>

Hi All, I want to get the process ID by supplying the window handle to the following API. DWORD GetWindowThreadProcessId(HWND hWnd,LPDWORD lpdwProcessId); However I am failing to understand how can I pass the Pointer…

---

## [Mixins and class variables](https://www.ruby-forum.com/t/mixins-and-class-variables/123327)

<div class="topic-metadata">

**Author:** [@Brubix](https://www.ruby-forum.com/u/Brubix)\
**Replies:** 7\
**Last updated:** [December 17, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/mixins-and-class-variables/123327 "2007-12-17T12:12:39Z")

</div>

I can’t figure out how to set class variables from class methods inherited from a module ? The following doesn’t work as I expected (I spare you my others pathetic attempts): module MyModule def self.extended(base) …

---

## [Ruby, RoR, and NLS (= national language support)](https://www.ruby-forum.com/t/ruby-ror-and-nls-national-language-support/123401)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/ruby-ror-and-nls-national-language-support/123401 "2007-12-17T12:09:43Z")

</div>

If you want to write or adapt code, that does not only communicate with its users in let’s say English, what’s the ruby resp. RoR approach to that? If I take (e.g.) the RailsSpace code as a basis for a community web …

---

## [Memory leak?](https://www.ruby-forum.com/t/memory-leak/123334)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 11:18am UTC](https://www.ruby-forum.com/t/memory-leak/123334 "2007-12-17T11:18:45Z")

</div>

Hi, Does anyone see anything here, for case\_number in 1…NUMBER\_OF\_CASES case\_dir = File.join( ‘Cases’, ‘Case’ ) + case\_number.to\_s.rjust(5,“0”) mkdir\_p case\_dir ln\_sf LINK\_FILES, case\_dir unless LINK\_FILES.empty? …

---

## [Ruport 1.4 Preview Release](https://www.ruby-forum.com/t/ruport-1-4-preview-release/196545)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 10:42am UTC](https://www.ruby-forum.com/t/ruport-1-4-preview-release/196545 "2007-12-17T10:42:59Z")

</div>

Hi folks, We’ve decided to do a preview release as Ruport 1.4 will be coming out within the next couple weeks. We’ve pretty much rounded off the features that will be in the release, and now just need your help ident…

---

## [Partial Search](https://www.ruby-forum.com/t/partial-search/123391)

<div class="topic-metadata">

**Author:** [@ruby\_tl](https://www.ruby-forum.com/u/ruby_tl)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 10:40am UTC](https://www.ruby-forum.com/t/partial-search/123391 "2007-12-17T10:40:07Z")

</div>

Can someone please help me to adjust the folowing method into displaying using a flag. Basically what I want it to do it have an array of keywords and a flag which asks partial match or exact These are the keywords…

---

## [Domain check](https://www.ruby-forum.com/t/domain-check/123385)

<div class="topic-metadata">

**Author:** [@bebitzaa](https://www.ruby-forum.com/u/bebitzaa)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 10:01am UTC](https://www.ruby-forum.com/t/domain-check/123385 "2007-12-17T10:01:22Z")

</div>

Hello, I wan’t to make an domain check tools in ruby on rails. For example i enter test.com and click check will display if the domain is available or not. I think there is an API or something. Thanks

---

## [Magic / counter-magic? (detect loading file?)](https://www.ruby-forum.com/t/magic-counter-magic-detect-loading-file/123347)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 9\
**Last updated:** [December 17, 2007, 6:57am UTC](https://www.ruby-forum.com/t/magic-counter-magic-detect-loading-file/123347 "2007-12-17T06:57:47Z")

</div>

Here’s something that’s puzzling me. Somewhere inside Rails is something which loads your .irbrc under some circumstances. It means that if you have a gem which adds a lot of methods to Object and which is required by…

---

## [Net:Telnet to Cisco Router](https://www.ruby-forum.com/t/net-telnet-to-cisco-router/123180)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 6\
**Last updated:** [December 17, 2007, 6:45am UTC](https://www.ruby-forum.com/t/net-telnet-to-cisco-router/123180 "2007-12-17T06:45:05Z")

</div>

Hi Ruby Forum, I have some code that will login to my cisco router and run a basic command. The problem is, I need to get into enable mode to run additional command. Getting into enable mode requires typing “enable”,…

---

## [MySQL Module - Segmentation Fault - Windows](https://www.ruby-forum.com/t/mysql-module-segmentation-fault-windows/119962)

<div class="topic-metadata">

**Author:** [@Venks](https://www.ruby-forum.com/u/Venks)\
**Replies:** 3\
**Last updated:** [December 17, 2007, 6:31am UTC](https://www.ruby-forum.com/t/mysql-module-segmentation-fault-windows/119962 "2007-12-17T06:31:24Z")

</div>

Hi, I am getting “segmentation fault” when I try to run the following piece of ruby code. I installed the latest version of MySQL version for Windows 5.1.22 I installed the MySQL module using “gem install mysql” and …

---

## [Text file to code?](https://www.ruby-forum.com/t/text-file-to-code/123361)

<div class="topic-metadata">

**Author:** [@pavel989](https://www.ruby-forum.com/u/pavel989)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 5:29am UTC](https://www.ruby-forum.com/t/text-file-to-code/123361 "2007-12-17T05:29:27Z")

</div>

earlier i asked if its possible to load a string as code. but now, lets say i have a config file. a text file with ruby code in it. how can i load that into my ruby code? but for that matter, everytime it does load it…

---

## [Mechanize](https://www.ruby-forum.com/t/mechanize/123365)

<div class="topic-metadata">

**Author:** [@Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/u/Ramiro_Diaz_Trepat)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 5:24am UTC](https://www.ruby-forum.com/t/mechanize/123365 "2007-12-17T05:24:18Z")

</div>

Hello list, I need to parse the contents of a weird web site, that uses a session id which is 80,000 characters long, on a hidden input tag. I try to use Mechanize for the task, but, since this web page has the 12th …

---

## [JRuby 1.0.3 Released](https://www.ruby-forum.com/t/jruby-1-0-3-released/123290)

<div class="topic-metadata">

**Author:** [@Thomas\_E](https://www.ruby-forum.com/u/Thomas_E)\
**Replies:** 10\
**Last updated:** [December 17, 2007, 4:12am UTC](https://www.ruby-forum.com/t/jruby-1-0-3-released/123290 "2007-12-17T04:12:58Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.0.3. Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/ JRuby 1.0.3 is a minor release of our stable 1.0 branch. The fixes in t…

---

## [Ruby-GNOME2](https://www.ruby-forum.com/t/ruby-gnome2/123359)

<div class="topic-metadata">

**Author:** [@pie-social](https://www.ruby-forum.com/u/pie-social)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 4:03am UTC](https://www.ruby-forum.com/t/ruby-gnome2/123359 "2007-12-17T04:03:05Z")

</div>

Getting error during testing the install of Ruby-GNOME2. I:/InstantRails17/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in gem\_original\_require': no such file to load -- gtk2 (LoadError) from I:/InstantRa…

---

## [Plugin if statement not working :(](https://www.ruby-forum.com/t/plugin-if-statement-not-working/123358)

<div class="topic-metadata">

**Author:** [@envygeeks](https://www.ruby-forum.com/u/envygeeks)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 1:26am UTC](https://www.ruby-forum.com/t/plugin-if-statement-not-working/123358 "2007-12-17T01:26:28Z")

</div>

I’m having a bit of trouble with a Mephisto plugin that doesn’t seem to want to work right. The articles\_by\_month\_and\_year won’t detect an empty return at all. For example if they go to /archives/2007/08 and there a…

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

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