Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   wxruby problem (http://www.velocityreviews.com/forums/t859650-wxruby-problem.html)

Haris Bogdanović 09-19-2009 05:40 PM

wxruby problem
 
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.



Haris Bogdanović 09-19-2009 05:43 PM

Re: wxruby problem
 

"Haris Bogdanović" <fbogdanovi@xnet.hr> wrote in message
news:h9352r$1fq$1@gregory.bnet.hr...
> 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.


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




Tim Hunter 09-19-2009 06:23 PM

Re: wxruby problem
 
Haris Bogdanović wrote:
> 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.


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

--
MagickWand for Ruby - http://magickwand.rubyforge.org/


Haris Bogdanović 09-19-2009 06:25 PM

Re: wxruby problem
 
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.


"Haris Bogdanović" <fbogdanovi@xnet.hr> wrote in message
news:h9352r$1fq$1@gregory.bnet.hr...
> 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.
>




Tim Hunter 09-19-2009 06:47 PM

Re: wxruby problem
 
Haris Bogdanović wrote:
> 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 $:"

--
MagickWand for Ruby - http://magickwand.rubyforge.org/



All times are GMT. The time now is 02:04 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57