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
On Wednesday 27 August 2008, Andrea A. 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
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
uninitializad constant SQLite_Utility (NameError)
To make it known you need to
require
it.
Andrea A. 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
Thanks to everyone, i solved the problem!