# Ruby

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

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

---

## [Struct (not) accepting attributes](https://www.ruby-forum.com/t/struct-not-accepting-attributes/72718)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [October 19, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/struct-not-accepting-attributes/72718 "2006-10-19T15:00:36Z")

</div>

Sum = Struct.new(:bla, :“sum(value)”) sum = Sum.new(2, 5) =\> #\<struct Sum bla=2, :“sum(value)”=5\> sum.send(:“sum(value)”) NoMethodError: undefined method sum(value)' for #\<struct Sum bla=2, :"sum(value)"=5\> class X …

---

## [Help:dynamic inherit from a class](https://www.ruby-forum.com/t/help-dynamic-inherit-from-a-class/72859)

<div class="topic-metadata">

**Author:** [@karl1113](https://www.ruby-forum.com/u/karl1113)\
**Replies:** 2\
**Last updated:** [October 19, 2006, 1:28pm UTC](https://www.ruby-forum.com/t/help-dynamic-inherit-from-a-class/72859 "2006-10-19T13:28:48Z")

</div>

Hi all: Now I have problem about dynamiclly inheriting form a class. For example: class\_name=‘MyClass’ klass = Object.const\_set(class\_name, Class.new) klass.class\_eval do … end now i get a class named 'MyClass',the…

---

## [Instance variable not initialized warning](https://www.ruby-forum.com/t/instance-variable-not-initialized-warning/72848)

<div class="topic-metadata">

**Author:** [@Esad\_H](https://www.ruby-forum.com/u/Esad_H)\
**Replies:** 1\
**Last updated:** [October 19, 2006, 1:18pm UTC](https://www.ruby-forum.com/t/instance-variable-not-initialized-warning/72848 "2006-10-19T13:18:40Z")

</div>

Hi! In the following piece of code: class Foo def bar if @var.nil? puts “First assignment” @var = 1; else @var +=1; end end end Foo.new.bar When I run ruby (1.8.4)with -d ($DEBUG=true) I get to see the follo…

---

## [Ruby Memory Leak Detector](https://www.ruby-forum.com/t/ruby-memory-leak-detector/72856)

<div class="topic-metadata">

**Author:** [@albino\_squirrel](https://www.ruby-forum.com/u/albino_squirrel)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 1:10pm UTC](https://www.ruby-forum.com/t/ruby-memory-leak-detector/72856 "2006-10-19T13:10:38Z")

</div>

Announcing Software Tools for Ruby We are pleased to inform you that we have completed the port and beta test of our Memory Analysis software tool to support Ruby. The software tools run on the Windows NT/2000/XP (and…

---

## [ActionWebService deprecated?](https://www.ruby-forum.com/t/actionwebservice-deprecated/72829)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 4\
**Last updated:** [October 19, 2006, 11:10am UTC](https://www.ruby-forum.com/t/actionwebservice-deprecated/72829 "2006-10-19T11:10:45Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey all, I thought I remembered seeing a comment about ActionWebService being deprecated in favor of something else in the latest Rails Edge. Is that true or did I dream…

---

## [Difficulty with Ajax](https://www.ruby-forum.com/t/difficulty-with-ajax/102560)

<div class="topic-metadata">

**Author:** [@darrenevans](https://www.ruby-forum.com/u/darrenevans)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 9:58am UTC](https://www.ruby-forum.com/t/difficulty-with-ajax/102560 "2006-10-19T09:58:57Z")

</div>

I have a difficult using Ajax and wondered whether anyone has the expertise to advise me how to proceed? We start at edit - this calls a partial form, which then calls a series of partials (which themselves call part…

---

## [Uri to absolute/relative path](https://www.ruby-forum.com/t/uri-to-absolute-relative-path/72806)

<div class="topic-metadata">

**Author:** [@apparna](https://www.ruby-forum.com/u/apparna)\
**Replies:** 1\
**Last updated:** [October 19, 2006, 9:06am UTC](https://www.ruby-forum.com/t/uri-to-absolute-relative-path/72806 "2006-10-19T09:06:10Z")

</div>

Hello, I’m new to ruby but so far my experience with Ruby has been great. I’m unable to open an uri based on the file path. This works require ‘open-uri’ open(“http://www.ruby-lang.org/”) {|f| f.each\_line {|line| p …

---

## [Re: using classes problem](https://www.ruby-forum.com/t/re-using-classes-problem/72360)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 9\
**Last updated:** [October 19, 2006, 8:50am UTC](https://www.ruby-forum.com/t/re-using-classes-problem/72360 "2006-10-19T08:50:08Z")

</div>

From: Scott D\_o I am trying to use a class that I wrote in another file, and it doesn’t seem to want to work. At the beginning of the file that I do \[require ‘classname’\] with the single quotes a) What is the name…

---

## [Rs 0.1.2](https://www.ruby-forum.com/t/rs-0-1-2/72835)

<div class="topic-metadata">

**Author:** [@rue](https://www.ruby-forum.com/u/rue)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 8:48am UTC](https://www.ruby-forum.com/t/rs-0-1-2/72835 "2006-10-19T08:48:07Z")

</div>

= rs === Synopsis rs is a project to implement a non-traditional object-oriented shell in Ruby. The three main features will be the simple power of Ruby as the shell scripting language, an objectlike interface to f…

---

## [My first feeling of Ruby](https://www.ruby-forum.com/t/my-first-feeling-of-ruby/72740)

<div class="topic-metadata">

**Author:** [@florent\_g](https://www.ruby-forum.com/u/florent_g)\
**Replies:** 14\
**Last updated:** [October 19, 2006, 8:32am UTC](https://www.ruby-forum.com/t/my-first-feeling-of-ruby/72740 "2006-10-19T08:32:03Z")

</div>

Hi all, Today I’m learning Ruby. Globally It’s a great programming langage but I’ve noticed some irrationnal things: First thing: irb(main):138:0\* class Toto irb(main):139:1\> @@test=“a” irb(main):140:1\> irb(main…

---

## [RubyConf Dinner by ThoughtWorks](https://www.ruby-forum.com/t/rubyconf-dinner-by-thoughtworks/72818)

<div class="topic-metadata">

**Author:** [@Benjamin\_C](https://www.ruby-forum.com/u/Benjamin_C)\
**Replies:** 1\
**Last updated:** [October 19, 2006, 8:17am UTC](https://www.ruby-forum.com/t/rubyconf-dinner-by-thoughtworks/72818 "2006-10-19T08:17:55Z")

</div>

Is the Saturday evening dinner for everyone, including those without a meal ticket? If not, when does the keynote start (so I know when to get back from getting my dinner)?

---

## [Too complex for me](https://www.ruby-forum.com/t/too-complex-for-me/72782)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 4\
**Last updated:** [October 19, 2006, 8:03am UTC](https://www.ruby-forum.com/t/too-complex-for-me/72782 "2006-10-19T08:03:54Z")

</div>

I need help from a ruby master… it’s too hard with my present understanding, any starting key will be apprciated … from a period range \[start\_date, end\_date\] in ayear , I need to produce a list of special days like t…

---

## [Mixin a module method as a class method](https://www.ruby-forum.com/t/mixin-a-module-method-as-a-class-method/72724)

<div class="topic-metadata">

**Author:** [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Replies:** 9\
**Last updated:** [October 19, 2006, 7:01am UTC](https://www.ruby-forum.com/t/mixin-a-module-method-as-a-class-method/72724 "2006-10-19T07:01:48Z")

</div>

Is it possible to mix in a module method to become a class method? I’d like to define the method\_added method in a module and then mix it into a class like so module Foo def self.method\_added(method) puts “Added #{m…

---

## [Install GSL\\Ruby 1.8.3 with Mingw/MSYS at Windows failed?](https://www.ruby-forum.com/t/install-gsl-ruby-1-8-3-with-mingw-msys-at-windows-failed/72809)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [October 19, 2006, 6:59am UTC](https://www.ruby-forum.com/t/install-gsl-ruby-1-8-3-with-mingw-msys-at-windows-failed/72809 "2006-10-19T06:59:47Z")

</div>

Hi I tried installing GSL\\Ruby 1.8.3 with Mingw/MSYS at Windows XP. But it failed, I am wondering if someone can give me some help. I installed Ruby at Windows using a one-click Ruby installer ruby185-21.exe. I ins…

---

## [Whats this lambda code doing?](https://www.ruby-forum.com/t/whats-this-lambda-code-doing/72811)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 16\
**Last updated:** [October 19, 2006, 6:35am UTC](https://www.ruby-forum.com/t/whats-this-lambda-code-doing/72811 "2006-10-19T06:35:43Z")

</div>

I came across following code in typo’s application.rb and I can’t understand the last part, def with\_blog\_scoped\_classes(klasses=\[Content, Article, Comment, Page, Trackback\], &block) default\_id = this\_blog.id scope\_…

---

## [Why Class decls and API docs don't Match](https://www.ruby-forum.com/t/why-class-decls-and-api-docs-dont-match/72786)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [October 19, 2006, 6:05am UTC](https://www.ruby-forum.com/t/why-class-decls-and-api-docs-dont-match/72786 "2006-10-19T06:05:40Z")

</div>

Anybody who’s done any Ruby on Rails will have seen, edited, or constructed the following which is suggestive of a general Ruby issue: class ApplicationController \< ActionController::Base layout “standard” end Now n…

---

## [Bitwise operations](https://www.ruby-forum.com/t/bitwise-operations/72803)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 1\
**Last updated:** [October 19, 2006, 4:55am UTC](https://www.ruby-forum.com/t/bitwise-operations/72803 "2006-10-19T04:55:34Z")

</div>

Hi, I have a binary packet stored in a string. I also have a packet specification and I’d like to print the first byte as a hex value to check it corresponds to the expected value from the specification (‘7F’). I c…

---

## [Sprites... I suck at them....(rubygame)](https://www.ruby-forum.com/t/sprites-i-suck-at-them-rubygame/225926)

<div class="topic-metadata">

**Author:** [@mohammad](https://www.ruby-forum.com/u/mohammad)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 4:16am UTC](https://www.ruby-forum.com/t/sprites-i-suck-at-them-rubygame/225926 "2006-10-19T04:16:12Z")

</div>

okay here is my little sprite file with rubygame require “rubygame” $stdout.sync = true Rubygame.init() class Chr include Rubygame::Sprites::Sprite @@chrforward = Rubygame::Image.load(“forward.png”) @@chrleft = Ru…

---

## [RubyGame on windows](https://www.ruby-forum.com/t/rubygame-on-windows/72556)

<div class="topic-metadata">

**Author:** [@mohammad](https://www.ruby-forum.com/u/mohammad)\
**Replies:** 8\
**Last updated:** [October 19, 2006, 4:13am UTC](https://www.ruby-forum.com/t/rubygame-on-windows/72556 "2006-10-19T04:13:12Z")

</div>

I just installed rubygame for windows but when I require it, the “rubygame.rb” tries to load “rubygame.so” which I don’t have if I remove this require from the lib then there are errors that alot of things are undifie…

---

## [Cross Compiling Ruby Extension](https://www.ruby-forum.com/t/cross-compiling-ruby-extension/72584)

<div class="topic-metadata">

**Author:** [@bct](https://www.ruby-forum.com/u/bct)\
**Replies:** 8\
**Last updated:** [October 19, 2006, 4:02am UTC](https://www.ruby-forum.com/t/cross-compiling-ruby-extension/72584 "2006-10-19T04:02:04Z")

</div>

Hello, I’m attempting to cross compile a ruby extension for Windows from a Linux box. Im running Ubuntu 6.06, Ruby 1.8.5, and mingw gcc 3.4.4. I attempted to follow Mauricio F.'s instructions http://eigenclass.org/…

---

## [RoR Apache2 threading](https://www.ruby-forum.com/t/ror-apache2-threading/72814)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 3:11am UTC](https://www.ruby-forum.com/t/ror-apache2-threading/72814 "2006-10-19T03:11:59Z")

</div>

When I try to run a thread in ruby on rails I can get it works fine, but when port the application to Apache2+ fastCGI +RoR, the thread will be in status of sleep Any one know how to fix it?

---

## [START\_TLS support](https://www.ruby-forum.com/t/start-tls-support/72813)

<div class="topic-metadata">

**Author:** [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 3:07am UTC](https://www.ruby-forum.com/t/start-tls-support/72813 "2006-10-19T03:07:59Z")

</div>

Hi, I’m not good in LDAP and START\_TLS but I could write START\_TLS support code for Net::LDAP. I refered Net::LDAP module in Perl and OpenLDAP source and tested with OpenLDAP server (slapd). Thanks,

---

## [Re: Bitwise operations](https://www.ruby-forum.com/t/re-bitwise-operations/72804)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 2\
**Last updated:** [October 19, 2006, 2:59am UTC](https://www.ruby-forum.com/t/re-bitwise-operations/72804 "2006-10-19T02:59:59Z")

</div>

From: Rob L. I can’t understand how to access the first byte from a string (a series of 8 bit bytes I believe). There don’t seem to be any bit-shift operators in Ruby for a string - could anybody advise how I go ab…

---

## [Displaying Hash Problems](https://www.ruby-forum.com/t/displaying-hash-problems/72579)

<div class="topic-metadata">

**Author:** [@coolboarderguy](https://www.ruby-forum.com/u/coolboarderguy)\
**Replies:** 6\
**Last updated:** [October 19, 2006, 2:25am UTC](https://www.ruby-forum.com/t/displaying-hash-problems/72579 "2006-10-19T02:25:57Z")

</div>

Hi All, just getting back into learning Ruby and thought I’d play with classes and hashes today. Below code produces the following ouput, mark@marklaptop:~/study/ruby$ ruby songs.rb Enter your name Mark Enter song…

---

## [Re: Why Class decls and API docs don't Match](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72800)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 1:07am UTC](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72800 "2006-10-19T01:07:50Z")

</div>

From: Ken B. \[mailto:removed\_email\_address@domain.invalid\] I nevertheless do not know what the rationale is for not bringing along the class methods of a module along with the instance methods when the module is inc…

---

## [Re: Partial Resolution?](https://www.ruby-forum.com/t/re-partial-resolution/72801)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 1:05am UTC](https://www.ruby-forum.com/t/re-partial-resolution/72801 "2006-10-19T01:05:50Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] But there’s still no: include ActionController::Layout::ClassMethods. Nope. But in action\_controller/layout.rb there is: modul…

---

## [RMagick 1.14.0 compile error (Linux)](https://www.ruby-forum.com/t/rmagick-1-14-0-compile-error-linux/72430)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [October 19, 2006, 12:37am UTC](https://www.ruby-forum.com/t/rmagick-1-14-0-compile-error-linux/72430 "2006-10-19T00:37:46Z")

</div>

I’m trying to compile RMagick 1.14.0 on Dreamhost with Ruby 1.8.5 and ImageMagick 6.3.0. I’m installing this all locally in my home directory as I like to be able to maintain my own packages. Anyway, Ruby and ImageMag…

---

## [Code behind HTML](https://www.ruby-forum.com/t/code-behind-html/72479)

<div class="topic-metadata">

**Author:** [@vincpa](https://www.ruby-forum.com/u/vincpa)\
**Replies:** 6\
**Last updated:** [October 18, 2006, 9:59pm UTC](https://www.ruby-forum.com/t/code-behind-html/72479 "2006-10-18T21:59:07Z")

</div>

Hi, After having some issues with eRuby and embedded ruby in HTML, Im trying to find out if its possible to develop a web page in the same way that ASP.NET works. Basically you straight HTML with no embedded script a…

---

## [Ruby Open GL on OS X?](https://www.ruby-forum.com/t/ruby-open-gl-on-os-x/72227)

<div class="topic-metadata">

**Author:** [@tsyed](https://www.ruby-forum.com/u/tsyed)\
**Replies:** 12\
**Last updated:** [October 18, 2006, 9:31pm UTC](https://www.ruby-forum.com/t/ruby-open-gl-on-os-x/72227 "2006-10-18T21:31:03Z")

</div>

Hi all. I’m trying to use Ruby to write OpenGL programs for an assignment in a graphics course. I was previously using Ruby on Windows, and OGL ran pefectly fine in that platform. I used the Ruby one click installer …

---

## [Re: newbie ftp problem](https://www.ruby-forum.com/t/re-newbie-ftp-problem/72773)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 5\
**Last updated:** [October 18, 2006, 9:23pm UTC](https://www.ruby-forum.com/t/re-newbie-ftp-problem/72773 "2006-10-18T21:23:00Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] files = ftp.nlst(‘data’) Net::FTPPermError: 500 Invalid PORT command. You changed directories into ‘data’, and are then trying…

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

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