# WET/RubyGems won't work

**URL:** <https://www.ruby-forum.com/t/wet-rubygems-wont-work/137916>\
**Category:** Ruby\
**Created:** [May 18, 2008, 7:51am UTC](https://www.ruby-forum.com/t/wet-rubygems-wont-work/137916 "2008-05-18T07:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![renian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@renian](https://www.ruby-forum.com/u/renian)\
**Post date:** [May 18, 2008, 7:51am UTC](https://www.ruby-forum.com/t/wet-rubygems-wont-work/137916/1 "2008-05-18T07:51:24Z")

</div>

I’m having problems getting WET (rubygem: wet-winobj) to work. My main  
problem is that it just can’t seem to find its own files. For example,  
if I do:

gem ‘wet-winobj’  
require ‘wet/winobjects/AppWindow.rb’

It then returns:

> ruby BringToFront.rb  
> c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
> `gem_original_require': no such file to load -- wet/winobjects/AppWindow.rb (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
> from BringToFront.rb:2  
> Exit code: 1

If I put in the direct path, as in:

gem ‘wet-winobj’  
require  
‘C:\ruby\lib\ruby\gems\1.8\gems\wet-winobj-0.1-mswin32\src\wet\winobjects\AppWindow.rb’

It returns:

> ruby BringToFront.rb  
> c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
> `gem_original_require': no such file to load -- wet/winobjects/Window.rb (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
> from  
> C:\ruby\lib\ruby\gems\1.8\gems\wet-winobj-0.1-mswin32\src\wet\winobjects\AppWindow.rb:16  
> from c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
> `gem_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
> from BringToFront.rb:2  
> Exit code: 1

Meaning that the file that I now successfully found can’t find  
everything else that it’s trying to include…which just so happen to be  
in the first format, wet/winobjects/file.rb. The odd thing about this is  
that some other ruby gems seem to work flawlessly. For example, I can  
run ProgressBar perfectly with just:

gem ‘progressbar’  
require ‘progressbar.rb’

And it won’t whine. Heck, I didn’t even need to give it any directory  
names.

So you know, putting in require ‘rubygems’ doesn’t work, as Windows is  
already set up to use them automatically. Further, truncating the second  
part to find AppWindow.rb doesn’t seem to work. But even if they did, I  
would need a fix so that the files that AppWindow wants to require can  
be found. Is there any way to do this without modifying AppWindow.rb?

Thanks.

---

<div class="post-metadata">

**Author:** ![renian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@renian](https://www.ruby-forum.com/u/renian)\
**Post date:** [May 18, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/wet-rubygems-wont-work/137916/2 "2008-05-18T22:50:51Z")

</div>

On May 18, 2:51 am, Jeff Vv [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> (LoadError)
> 
> > Exit code: 1  
> > And it won’t whine. Heck, I didn’t even need to give it any directory  
> > names.
> 
> So you know, putting in require ‘rubygems’ doesn’t work, as Windows is  
> already set up to use them automatically. Further, truncating the second  
> part to find AppWindow.rb doesn’t seem to work. But even if they did, I  
> would need a fix so that the files that AppWindow wants to require can  
> be found. Is there any way to do this without modifying AppWindow.rb?

What you’re experiencing is a bad gem specification.

for ‘wet/something’ to work on a require, ‘src’ directory must be  
included so rubygems can lookup for it.

The gem author need to ‘require\_path’ ‘src’ in his Gem::Specification  
to make the rubygems require lookup functionality work.

HTH,
