WET/RubyGems won't work

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.

···

--
Posted via http://www.ruby-forum.com/\.

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,

···

On May 18, 2:51 am, Jeff Vv <lordren...@gmail.com> wrote:

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?

--
Luis Lavena