Tell me what could be wrond:)

  • Thread starter Steve Withoutjob
  • Start date
S

Steve Withoutjob

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:))
 
M

Marvin Gülker

Steve said:
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 ( http://rubygems.org/gems/ocra ), which
does it's job quite well.

Marvin
 
Y

yermej

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".
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top