Tell me what could be wrond:)

I'm trying to learn this language,two days now,and it already gives me
headaches,instead of learning something,more questions pop-up...
Like for example,this code runs perfectly:

require "rubygems"
require "wx"
include Wx

class MinimalApp < App
    def on_init
         Frame.new(nil, -1, "The Bare Minimum").show()
    end
end

MinimalApp.new.main_loop

So why this doesn't ?

require "rubygems"
require "wx"
inlcude Wx

class Try < App
   def on_init
       Frame.new(nil,-1,"My First Window").show()
   end
end

Try.new.main_loop

Nothing happens,when i drag it on rubyx.exe file...but the first one
makes simple form pop-up..

Also i've installed wxruby manually,because when i try to do that
through console,it crashes my whole PC...no errors,nothing everything
just stops responding.

I've also tried to understand thing like RubyScript2Exe.
Nice,but when you open their page it says nothing about how to install
it on windows,just the usage..so ok,i thought i'll try to install it
through console,so i typed gem intall RubyScript2Exe and it did,nice i
thought,but when i try to use it,like it says on their page,it gives
only errors and there's nothing about that there.

Going for aspirin,brb:))

···

--
Posted via http://www.ruby-forum.com/.

Steve Withoutjob wrote:

So why this doesn't ?
Nothing happens,when i drag it on rubyx.exe file...

The code looks fine to me. Try running it from the command line (you can
invoke Ruby via the "ruby <yourscript.rb>" command [without the quotes,
of course]) and then post the output here. Btw. you mean "rubyw.exe",
not "rubyx.exe", don't you?

Also i've installed wxruby manually,because when i try to do that
through console,it crashes my whole PC...no errors,nothing everything
just stops responding.

The wxRuby guys probably know more about that. Switch over to the wxRuby
forum (available via ruby-forum.com, too) and ask there.

I've also tried to understand thing like RubyScript2Exe.

rubyscript2exe is out of date, it doesn't work with the current Ruby and
RubyGems versions. Try out OCRA ( ocra | RubyGems.org | your community gem host ), which
does it's job quite well.

Marvin

···

--
Posted via http://www.ruby-forum.com/\.

So why this doesn't ?

require "rubygems"
require "wx"
inlcude Wx

If this is the actual code you're trying to run, it's broken because
you've misspelled "include".

···

On Jul 3, 7:55 am, Steve Withoutjob <caminoro...@gmail.com> wrote:

class Try < App
def on_init
Frame.new(nil,-1,"My First Window").show()
end
end

Try.new.main_loop