# Cannot get started

**URL:** <https://www.ruby-forum.com/t/cannot-get-started/197994>\
**Category:** wxRuby\
**Created:** [October 24, 2010, 8:32am UTC](https://www.ruby-forum.com/t/cannot-get-started/197994 "2010-10-24T08:32:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 24, 2010, 8:32am UTC](https://www.ruby-forum.com/t/cannot-get-started/197994/1 "2010-10-24T08:32:18Z")

</div>

I’m sure I’ve done something basic wrong, but I don’t see it. I’m  
running MAC OSX 10.6.4

I installed using ruby gems:  
[Charles-Parkers-iMac:~] charlesparker% sudo gem install wxruby  
Password:  
Successfully installed wxruby-1.9.3-universal-darwin  
1 gem installed  
Installing ri documentation for wxruby-1.9.3-universal-darwin…  
Installing RDoc documentation for wxruby-1.9.3-universal-darwin…

I created the initial test program which seemed to need the require  
rubygems line:  
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

And I tried to run it:  
[Charles-Parkers-iMac:~/Code] charlesparker% ruby ./wxruby-test.rb  
/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle:  
dlopen(/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle,  
9): no suitable image found. Did find: (LoadError)  
/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle:  
no matching architecture in universal wrapper -  
/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle  
from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom\_require.rb:31:in  
`require' from /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wx.rb:12 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in`gem\_original\_require’  
from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom\_require.rb:36:in  
`require’  
from ./wxruby-test.rb:2  
[Charles-Parkers-iMac:~/Code] charlesparker%

Any help would be greatly appreciated!

Thanx - Charlie

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 24, 2010, 6:02pm UTC](https://www.ruby-forum.com/t/cannot-get-started/197994/2 "2010-10-24T18:02:39Z")

</div>

When I search with Finder, I cannot find ANY files (other than my test  
program) with wxruby or wx\_ruby in the file name. Does this mean the gem  
didn’t install the ruby bindings? The install appeared to work.

Thanx - Charlie

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 24, 2010, 9:37pm UTC](https://www.ruby-forum.com/t/cannot-get-started/197994/3 "2010-10-24T21:37:31Z")

</div>

I found my problem; I had to use the 32 bit instead of the 64 bit  
architecture, and the sample program works.

Out of curiosity, why do I need the “require rubygems” line before the  
“require wx” line?

Thanx - Charlie

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 25, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/cannot-get-started/197994/4 "2010-10-25T23:33:55Z")

</div>

Charles P. wrote in post #956758:

> I found my problem; I had to use the 32 bit instead of the 64 bit  
> architecture, and the sample program works.
> 
> Out of curiosity, why do I need the “require rubygems” line before the  
> “require wx” line?

Because you’ve used the “gem” command to install wxruby, it’s as simple  
as that 🙂

One thing to note though:

> > Successfully installed wxruby-1.9.3-universal-darwin  
> > 1 gem installed

This is an old version of wxRuby - it’s better if you grab the latest  
from here:  
[http://rubyforge.org/frs/?group\_id=35](http://rubyforge.org/frs/?group_id=35)

( For OSX 10.6:  
[http://rubyforge.org/frs/download.php/63386/wxruby-2.0.1-universal-darwin-9.gem](http://rubyforge.org/frs/download.php/63386/wxruby-2.0.1-universal-darwin-9.gem))

For some reason this package isn’t available via gem command. Once you  
download the file just run:

gem install wxruby-2.0.1-universal-darwin-9.gem

(make sure you uninstall the 1.9.3 wxruby first).

Hope that helps.

Łukasz
