# Tell me what could be wrond:)

**URL:** <https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055>\
**Category:** Ruby\
**Created:** [July 3, 2010, 2:55pm UTC](https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055 "2010-07-03T14:55:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![interactivenyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Post date:** [July 3, 2010, 2:55pm UTC](https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055/1 "2010-07-03T14:55:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![interactivenyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Post date:** [July 3, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055/2 "2010-07-03T18:59:14Z")

</div>

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

Marvin

---

<div class="post-metadata">

**Author:** ![interactivenyc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Post date:** [July 4, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055/3 "2010-07-04T20:15:39Z")

</div>

On Jul 3, 7:55 am, Steve W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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