I'm new on ruby so probably my question is stupid.
I've created some ruby classes, but when I try to use them with the
operator .new from another program file, it gives me this error:
uninitializad constant SQLite_Utility (NameError)
Please help me.
Thanks
···
--
Posted via http://www.ruby-forum.com/.
You need to require the file where you defined the class. For example
File file1.rb
class C
...
end
File file2.rb
require 'file1'
C.new
I hope this helps
Stefano
···
On Wednesday 27 August 2008, Andrea Aaa wrote:
I'm new on ruby so probably my question is stupid.
I've created some ruby classes, but when I try to use them with the
operator .new from another program file, it gives me this error:
uninitializad constant SQLite_Utility (NameError)
Please help me.
Thanks
Andrea Aaa wrote:
I try to use them with the operator .new
Your question has already been answered, so let me just point out this:
.new is not an operator it is nothing more than a simple method call.
HTH,
Sebastian
···
--
Jabber: sepp2k@jabber.org
ICQ: 205544826
uninitializad constant SQLite_Utility (NameError)
To make it known you need to
require
it.
···
--
Posted via http://www.ruby-forum.com/\.
Thanks to everyone, i solved the problem!
···
--
Posted via http://www.ruby-forum.com/.