Hi all, Can I download the first binary release and install RubyGems, then install gems? Is it too early in the game? Are there any instructions on how to setup the environment. I would like to run Ramaze + Sequel on Webrick. -- Posted via http://www.ruby-forum.com/.
The short answer is that it''s still a little early if you''re only using IronRuby. I have been trying this off and on, and my last attempt appears to be very close. I only ran it and didn''t dig any deeper, but I think RubyGems is looking for the ruby path. With IR only, it can''t find the path, so it sticks the RubyGems folders in C:\ on Windows. I received a few errors, but I need to look into it more. On Mon, Aug 18, 2008 at 9:59 AM, Mario Gutierrez <lists at ruby-forum.com>wrote:> Hi all, > > Can I download the first binary release and install RubyGems, then > install gems? Is it too early in the game? Are there any instructions on > how to setup the environment. I would like to run Ramaze + Sequel on > Webrick. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-- Ryan Riley ryan.riley at panesofglass.org http://www.panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080818/e509e589/attachment.html>
I did some research into getting rubygems and rake to work in IronRuby. The first thing I had to do was set the ENV variable GEM_PATH to the IronRuby/lib/ruby/gems/1.8 directory. That enabled rubygems to at least locate the rake gem. But now I''m stuck on an possible issue in the rubygems library. Looks like it is handling the version numbers of the libraries differently than Ruby. I''m looking into it further. Does anybody know how to do a --trace to print out the script callstack? It would certainly make it easier to track down problems in the .rb files. Thanks Jay Turpin -- Posted via http://www.ruby-forum.com/.
-D should give you script line numbers on the stack trace. On Tue, Sep 23, 2008 at 8:42 AM, Jay Turpin <lists at ruby-forum.com> wrote:> I did some research into getting rubygems and rake to work in IronRuby. > The first thing I had to do was set the ENV variable GEM_PATH to the > IronRuby/lib/ruby/gems/1.8 directory. That enabled rubygems to at least > locate the rake gem. > > But now I''m stuck on an possible issue in the rubygems library. Looks > like it is handling the version numbers of the libraries differently > than Ruby. I''m looking into it further. > > Does anybody know how to do a --trace to print out the script callstack? > It would certainly make it easier to track down problems in the .rb > files. > > Thanks > Jay Turpin > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/7c286550/attachment.html>
Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/26ba3a47/attachment.html>
You can also use tracing proc: Hook it in a code: set_trace_func proc { |*a| p a } and run ir.exe with -trace option. Note that stack traces are not available in -X:Interpret mode yet and in compiled mode they contain some internal frames. It''s the next item in my TODO list to fix that. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Tuesday, September 23, 2008 5:47 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D should give you script line numbers on the stack trace. On Tue, Sep 23, 2008 at 8:42 AM, Jay Turpin <lists at ruby-forum.com<mailto:lists at ruby-forum.com>> wrote: I did some research into getting rubygems and rake to work in IronRuby. The first thing I had to do was set the ENV variable GEM_PATH to the IronRuby/lib/ruby/gems/1.8 directory. That enabled rubygems to at least locate the rake gem. But now I''m stuck on an possible issue in the rubygems library. Looks like it is handling the version numbers of the libraries differently than Ruby. I''m looking into it further. Does anybody know how to do a --trace to print out the script callstack? It would certainly make it easier to track down problems in the .rb files. Thanks Jay Turpin -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/f0632211/attachment-0001.html>
-D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/f5e38add/attachment-0001.html>
Note that "rbd" is an alias for "ir -D" on my machine ;) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 9:30 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/9f650f03/attachment.html>
Tomas - Thanks for the advice. However, it is still not working as expected. When I run this ruby script: require ''rubygems'' require ''rake'' puts $LOAD_PATH It give me this output: C:\temp>ir -D t.rb C:/Projects/IronRuby/lib/ruby/site_ruby/1.8\rubygems/custom_require.rb:31:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 But the error is actually coming from deep inside the rubygems library Thanks! Regards, Jay Turpin "In the end, everything is a gag." - Charlie Chaplin From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 9:30 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/28ce1946/attachment-0001.html>
I see. Well it seems more broken than I thought it is :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:37 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Tomas - Thanks for the advice. However, it is still not working as expected. When I run this ruby script: require ''rubygems'' require ''rake'' puts $LOAD_PATH It give me this output: C:\temp>ir -D t.rb C:/Projects/IronRuby/lib/ruby/site_ruby/1.8\rubygems/custom_require.rb:31:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 But the error is actually coming from deep inside the rubygems library Thanks! Regards, Jay Turpin "In the end, everything is a gag." - Charlie Chaplin From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 9:30 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/dacc1503/attachment-0001.html>
Tomas - The problem seems to be coming from rubygems/custom_required.rb. It redefines Kernel.required() and is not re-throwing the error properly: This works: module Kernel alias gem_original_require require # :nodoc: def require(path) # :nodoc: gem_original_require path end end # module Kernel but this doesn''t: module Kernel alias gem_original_require require # :nodoc: def require(path) # :nodoc: gem_original_require path rescue LoadError => load_error raise load_error end end # module Kernel Regards, Jay Turpin "It is always the best policy to tell the truth, unless, of course, you are an exceptionally good liar." - Jerome K. Jerome From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 10:12 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems I see. Well it seems more broken than I thought it is :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:37 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Tomas - Thanks for the advice. However, it is still not working as expected. When I run this ruby script: require ''rubygems'' require ''rake'' puts $LOAD_PATH It give me this output: C:\temp>ir -D t.rb C:/Projects/IronRuby/lib/ruby/site_ruby/1.8\rubygems/custom_require.rb:31:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 But the error is actually coming from deep inside the rubygems library Thanks! Regards, Jay Turpin "In the end, everything is a gag." - Charlie Chaplin From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 9:30 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080923/b7f78706/attachment-0001.html>
I finally tracked down a bug that was causing an error when trying to use rubygems and rake. When a .gemspec was being read and evaluated to create a Gem::Specification instance, it was not creating a Gem::Version object properly. Turns out that the Version.create() method was checking to see if the parameter responds_to? :version. Somewhere along the line, the String class added a version method - which caused the error. Regards, Jay Turpin "Always do right. This will gratify some people and astonish the rest." - Mark Twain From: Turpin, Jay Sent: Tuesday, September 23, 2008 10:36 AM To: ''ironruby-core at rubyforge.org'' Subject: RE: [Ironruby-core] question on RubyGems Tomas - The problem seems to be coming from rubygems/custom_required.rb. It redefines Kernel.required() and is not re-throwing the error properly: This works: module Kernel alias gem_original_require require # :nodoc: def require(path) # :nodoc: gem_original_require path end end # module Kernel but this doesn''t: module Kernel alias gem_original_require require # :nodoc: def require(path) # :nodoc: gem_original_require path rescue LoadError => load_error raise load_error end end # module Kernel Regards, Jay Turpin "It is always the best policy to tell the truth, unless, of course, you are an exceptionally good liar." - Jerome K. Jerome From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 10:12 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems I see. Well it seems more broken than I thought it is :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:37 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Tomas - Thanks for the advice. However, it is still not working as expected. When I run this ruby script: require ''rubygems'' require ''rake'' puts $LOAD_PATH It give me this output: C:\temp>ir -D t.rb C:/Projects/IronRuby/lib/ruby/site_ruby/1.8\rubygems/custom_require.rb:31:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 But the error is actually coming from deep inside the rubygems library Thanks! Regards, Jay Turpin "In the end, everything is a gag." - Charlie Chaplin From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 9:30 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080924/0dbafbae/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: ironruby_rubygems_version.patch Type: application/octet-stream Size: 472 bytes Desc: ironruby_rubygems_version.patch URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080924/0dbafbae/attachment-0001.obj>
Yes, I found the same thing yesterday :). The patch I submitted for review a few hours ago contains a fix for this. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Wednesday, September 24, 2008 4:13 PM To: ''ironruby-core at rubyforge.org'' Subject: [Ironruby-core] RubyGems Patch I finally tracked down a bug that was causing an error when trying to use rubygems and rake. When a .gemspec was being read and evaluated to create a Gem::Specification instance, it was not creating a Gem::Version object properly. Turns out that the Version.create() method was checking to see if the parameter responds_to? :version. Somewhere along the line, the String class added a version method - which caused the error. Regards, Jay Turpin "Always do right. This will gratify some people and astonish the rest." - Mark Twain From: Turpin, Jay Sent: Tuesday, September 23, 2008 10:36 AM To: ''ironruby-core at rubyforge.org'' Subject: RE: [Ironruby-core] question on RubyGems Tomas - The problem seems to be coming from rubygems/custom_required.rb. It redefines Kernel.required() and is not re-throwing the error properly: This works: module Kernel alias gem_original_require require # :nodoc: def require(path) # :nodoc: gem_original_require path end end # module Kernel but this doesn''t: module Kernel alias gem_original_require require # :nodoc: def require(path) # :nodoc: gem_original_require path rescue LoadError => load_error raise load_error end end # module Kernel Regards, Jay Turpin "It is always the best policy to tell the truth, unless, of course, you are an exceptionally good liar." - Jerome K. Jerome From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 10:12 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems I see. Well it seems more broken than I thought it is :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:37 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Tomas - Thanks for the advice. However, it is still not working as expected. When I run this ruby script: require ''rubygems'' require ''rake'' puts $LOAD_PATH It give me this output: C:\temp>ir -D t.rb C:/Projects/IronRuby/lib/ruby/site_ruby/1.8\rubygems/custom_require.rb:31:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from t.rb:3 But the error is actually coming from deep inside the rubygems library Thanks! Regards, Jay Turpin "In the end, everything is a gag." - Charlie Chaplin From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 23, 2008 9:30 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] question on RubyGems -D is actually what you need: C:\Temp>rbd x.rb C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:7:in `bar'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:3:in `foo'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in `Call2'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in `UpdateAndExecute'' C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in `Update2'' x.rb:10 As I said, some internal frames are included as well, which is a bug that I''m going to fix soon. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Tuesday, September 23, 2008 9:15 AM To: ''ironruby-core at rubyforge.org'' Subject: Re: [Ironruby-core] question on RubyGems Michael - Thanks for the quick response, but that''s not quite what I meant. When I run Ruby and get an error, I get the complete stack trace of the Ruby code: C:\temp>ruby t.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus Error (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `all?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in `satisfied_by?'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `each'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in `search'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in `find_name'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'' from t.rb:2 However, when I run IronRuby and get an error, I only get one line of ruby code and the rest is the C# stack trace: C:\temp>ir t.rb custom_require.rb:26:in `require'': Bogus Error (RuntimeError) from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 The error really happens deep inside the Ruby code. Any ideas? Thanks Regards, Jay Turpin "Over 48.7% of all statistics are useless." - Anonymous -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080924/d59dfd00/attachment-0001.html>
Hi Tomas, I tried your block of code, but i''m still getting an error. Are you getting this error, or do you have rake working?>>> require ''rake''E:\IronRuby\trunk\src\IronRuby.Libraries\Builtins\KernelOps.cs:416:in `require'': no such file to load -- rake (LoadError) from E:\IronRuby\trunk\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in `Call3'' from E:\IronRuby\trunk\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in `UpdateAndExecute'' from E:\IronRuby\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in `Update3'' from :0 Thanks Ben On Tue, Sep 23, 2008 at 6:35 PM, Turpin, Jay <jay.turpin at intel.com> wrote:> Tomas - The problem seems to be coming from rubygems/custom_required.rb. It > redefines Kernel.required() and is not re-throwing the error properly: > > > > This works: > > > > module Kernel > > alias gem_original_require require # :nodoc: > > > > def require(path) # :nodoc: > > gem_original_require path > > end > > end # module Kernel > > > > but this doesn''t: > > > > module Kernel > > alias gem_original_require require # :nodoc: > > > > def require(path) # :nodoc: > > gem_original_require path > > rescue LoadError => load_error > > raise load_error > > end > > end # module Kernel > > > > Regards, > Jay Turpin > "It is always the best policy to tell the truth, unless, of course, you are > an exceptionally good liar." - Jerome K. Jerome > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Tuesday, September 23, 2008 10:12 AM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] question on RubyGems > > > > I see. Well it seems more broken than I thought it is J > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay > Sent: Tuesday, September 23, 2008 9:37 AM > To: ''ironruby-core at rubyforge.org'' > Subject: Re: [Ironruby-core] question on RubyGems > > > > Tomas ? Thanks for the advice. However, it is still not working as expected. > When I run this ruby script: > > > > require ''rubygems'' > > require ''rake'' > > > > puts $LOAD_PATH > > > > It give me this output: > > > > C:\temp>ir -D t.rb > > C:/Projects/IronRuby/lib/ruby/site_ruby/1.8\rubygems/custom_require.rb:31:in > `require'': Bogus Error (RuntimeError) > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in > `Call3'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in > `Update3'' > > from t.rb:3 > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in > `Call3'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in > `Update3'' > > from t.rb:3 > > > > But the error is actually coming from deep inside the rubygems library > > > > Thanks! > > > > Regards, > Jay Turpin > "In the end, everything is a gag." - Charlie Chaplin > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Tuesday, September 23, 2008 9:30 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] question on RubyGems > > > > -D is actually what you need: > > > > C:\Temp>rbd x.rb > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in > `Update2'' > > x.rb:7:in `bar'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in > `Call2'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in > `Update2'' > > x.rb:3:in `foo'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\MatchCaller.Generated.cs:30:in > `Call2'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > C:\M1\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:38:in > `Update2'' > > x.rb:10 > > > > As I said, some internal frames are included as well, which is a bug that > I''m going to fix soon. > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay > Sent: Tuesday, September 23, 2008 9:15 AM > To: ''ironruby-core at rubyforge.org'' > Subject: Re: [Ironruby-core] question on RubyGems > > > > Michael ? Thanks for the quick response, but that''s not quite what I meant. > When I run Ruby and get an error, I get the complete stack trace of the Ruby > code: > > > > C:\temp>ruby t.rb > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:283:in `satisfy?'': Bogus > Error (RuntimeError) > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in > `satisfied_by?'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:86:in > `all?'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in > `each'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in > `all?'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:273:in > `satisfied_by?'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:187:in > `search'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in > `each'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:185:in > `search'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:165:in > `find_name'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:187:in `activate'' > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in > `require'' > > from t.rb:2 > > > > However, when I run IronRuby and get an error, I only get one line of ruby > code and the rest is the C# stack trace: > > > > C:\temp>ir t.rb > > custom_require.rb:26:in `require'': Bogus Error (RuntimeError) > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in > `Call3'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in > `Update3'' > > from :0 > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs:35:in > `Call3'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\CallSite.cs:275:in > `UpdateAndExecute'' > > from > C:\Projects\IronRuby\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs:45:in > `Update3'' > > from :0 > > > > The error really happens deep inside the Ruby code. Any ideas? > > > > Thanks > > > > Regards, > Jay Turpin > "Over 48.7% of all statistics are useless." - Anonymous > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >