# Problems using own class

**URL:** <https://www.ruby-forum.com/t/problems-using-own-class/99071>\
**Category:** Ruby\
**Created:** [July 20, 2006, 4:02am UTC](https://www.ruby-forum.com/t/problems-using-own-class/99071 "2006-07-20T04:02:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@jah](https://www.ruby-forum.com/u/jah)\
**Post date:** [July 20, 2006, 4:02am UTC](https://www.ruby-forum.com/t/problems-using-own-class/99071/1 "2006-07-20T04:02:04Z")

</div>

Hi,

I just build my own class that looks like this

class Rechnungsdaten  
attr\_accessor :nummer  
end

I saved this file as “rechnungsdaten.rb” in the models folder.  
When I use this code:

@rechnung = Rechnungsdaten.new  
@rechnung.nummer = @rechnungsnummer

I get this error message in my browser:

undefined method `nummer=’ for #Rechnungsdaten:0x3976148

How could this be? I can’t understand that! Or do I have to include the  
class by using requieres? … But why doesn’t rails say me that it  
can’t find \>\> Rechnungsdaten \<\<?

Jonathan

---

<div class="post-metadata">

**Author:** ![jah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@jah](https://www.ruby-forum.com/u/jah)\
**Post date:** [July 20, 2006, 6:59am UTC](https://www.ruby-forum.com/t/problems-using-own-class/99071/2 "2006-07-20T06:59:22Z")

</div>

On Jul 19, 2006, at 7:00 PM, Jonathan H. wrote:

> How could this be? I can’t understand that! Or do I have to include  
> the class by using requieres? … But why doesn’t rails say me  
> that it can’t find \>\> Rechnungsdaten \<\<?

Rails questions go on the Rails mailing list.

[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![jah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@jah](https://www.ruby-forum.com/u/jah)\
**Post date:** [July 20, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/problems-using-own-class/99071/3 "2006-07-20T16:00:36Z")

</div>

Hi,

I solved this problem with the help of a german RoR forum.

The problem is that you have to reload the server when you made changes  
in the source!  
But you also can add

include Reloadable

to your class so it will be reloaded automaticly!

Jonathan

Jonathan H. schrieb:
