List Info

Thread: mingw exceptions




mingw exceptions
user name
2007-10-23 10:16:31
It would appear that it is possible to create a mingw build that does weird things (I'm not sure if a plain version exhibits these issues).  I have one distro built in which rubygems refuses to work--throws weird errors (it may have been just a faux pas of mine--I messed around with it a LOT so it's like a hodge-podge of junk).

Anyway if anyone has seen anything like this let me know:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'sources'
rescued exception
no such file to load -- sourcesC:/ruby_mingw4/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in `gem_original_require'
(sources does exist).


I go in there to see ;where ;the problem ;is, and add this code around "init_gemspecs"
begin
  gemspecs = init_gemspecs # this seems to throw some type of ephemeral exception or something
rescue Exception => e
print 'gotcha', e, e.backtrace.join("n"), "n"
end


An exception is raised, but this code doesn't catch it
When I change it to "rescue Object," I can catch it, but the backtrace is empty, and it seems to be a copy of an exception thrown earlier.

begin
gemspecs = init_gemspecs
rescue Object => e
print 'gotcha', e, e.backtrace.join("n"), "n"
end

If I do
require 'rubygems'
Gem.searcher
require 'sources'

It seems to do slightly diffferent things.
There seems to possibly be confusion on exceptions--like that earlier exception is raised...again!

So anyway I'm not sure if this is a 'real' problem or not or just one with because of carelessness on my part.  Just reporting findings.

Thoughts?
-Roger
Re: mingw exceptions
user name
2007-10-23 11:55:37
On 10/23/07, Roger Pack <rogerpack2005gmail.com> wrote:
> It would appear that it is possible to create a mingw
build that does weird
> things (I'm not sure if a plain version exhibits these
issues).  I have one
> distro built in which rubygems refuses to work--throws
weird errors (it may
> have been just a faux pas of mine--I messed around with
it a LOT so it's
> like a hodge-podge of junk).
>
> Anyway if anyone has seen anything like this let me
know:
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'sources'
> rescued exception
> no such file to load --
>
sourcesC:/ruby_mingw4/lib/ruby/site_ruby/1.8/rubygems/custom
_require.rb:30:in
> `gem_original_require'
> (sources does exist).
>
>
> I go in there to see where the problem is, and add
this
> code around "init_gemspecs"
>  begin
>    gemspecs = init_gemspecs # this seems to throw some
type of ephemeral
> exception or something
>  rescue Exception => e
>  print 'gotcha', e, e.backtrace.join("n"),
"n"
>  end
>
>
> An exception is raised, but this code doesn't catch it
> When I change it to "rescue Object," I can
catch it, but the backtrace is
> empty, and it seems to be a copy of an exception thrown
earlier.
>

You should check what init_gemspecs is doing.

If you think is a Ruby problem, try to isolate a simple
example and
bounce that to ruby-core 

But I guess RubyGems is getting confused by the information
in
rbconfig and the one it generates.

Try doing "gem env" and see where it's supposed to
get the gems from.

-- 
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard
effort,
which is the price which all of us must pay to achieve any
goal that
is worthwhile.
Vince Lombardi
_______________________________________________
Rubyinstaller-devel mailing list
Rubyinstaller-develrubyforge.org
http://rubyforge.org/mailman/listinfo/rubyinstaller-dev
el

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )