wxruby problem

H

Haris Bogdanoviæ

Hi.Line 2 produces an error:1 require "wx"
2 include Wx

after starting I get this:

uninitialized constant Wx (NameError)
from wx.rb:1:in `require'
from wx.rb:1
Exit code: 1
Can you tell me why is this happening ?Thanks.
 
H

Haris Bogdanoviæ

Haris Bogdanoviæ said:
Hi.Line 2 produces an error:1 require "wx"
2 include Wx

after starting I get this:

uninitialized constant Wx (NameError)
from wx.rb:1:in `require'
from wx.rb:1
Can you tell me why is this happening ?Thanks.

Why is my text all scrambled ? I use outlook express
 
T

Tim Hunter

Haris said:
Hi.Line 2 produces an error:1 require "wx"
2 include Wx

after starting I get this:

uninitialized constant Wx (NameError)
from wx.rb:1:in `require'
from wx.rb:1
Can you tell me why is this happening ?Thanks.

Any chance your test program is named wx.rb? If so, change it.
 
H

Haris Bogdanoviæ

I named my file wx.rb.
That was the cause.
Can anybody explain why ?
Doesn't really matter know but I would like to know anyway.

Thanks.
 
T

Tim Hunter

Haris said:
I named my file wx.rb.
That was the cause.
Can anybody explain why ?
Doesn't really matter know but I would like to know anyway.

Because Ruby looks in your current directory for files that you require,
so when you required 'wx' it found your test file. You can find out what
directories Ruby searches by running this command:

ruby -e"puts $:"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top