# LoadError: No such file to load -- wx

**URL:** <https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-wx/171211>\
**Category:** wxRuby\
**Created:** [June 28, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-wx/171211 "2009-06-28T19:42:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [June 28, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-wx/171211/1 "2009-06-28T19:42:28Z")

</div>

I have a program written with wxruby. If I try to execute it with

timeclock.rb

I get the error “`gem\_original\_require’: no such file to load – wx  
(LoadError)”

If I run it with

ruby timeclock.rb

it runs correctly. I _AM_ aware of the need to load rubygems. Therefore  
in my program, I have the explicit statements:

require ‘rubygems’  
require ‘wx’

As a result, I’m not sure what could be the problem. Can anyone offer  
any help?

Thanks in advance  
—Michael

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [July 1, 2009, 5:32pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-wx/171211/2 "2009-07-01T17:32:55Z")

</div>

Michael S. wrote:

> it runs correctly. I _AM_ aware of the need to load rubygems. Therefore  
> in my program, I have the explicit statements:
> 
> require ‘rubygems’  
> require ‘wx’
> 
> As a result, I’m not sure what could be the problem. Can anyone offer  
> any help?

Do you have multiple different versions of Ruby installed on your  
system, one with wxRuby installed, and one without? Perhaps the ruby  
being used when you invoke it the first way (timeclock.rb) isn’t the  
same as the ruby in PATH - what’s the shebang line?

alex
