I would like to see if MRI uses PATHEXT in this case, but I think from talking 
with Tomas, that it doesn't.

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Shri Borde
Sent: Friday, October 30, 2009 12:14 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Using the console in IronRuby on Rails

You can add a RubySpec spec for it to see the details of the specific Ruby API. 
Then if MRI and IronRuby both have the same behavior for the spec, your patch 
would be correct. Ie. You can use TDD to figure out the right behavior.

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Shay Friedman
Sent: Friday, October 30, 2009 11:50 AM
To: ironruby-core
Subject: [Ironruby-core] Using the console in IronRuby on Rails

Hi there,

I tried to use the Ruby on Rails console with IronRuby on an application I'm 
building by executing "ir script/console". Doing so ended up with an exception 
from RubyProcess.CreateProcess.

I debugged and found out that RoR tries to execute irb.bat which is MRI's, so I 
modified rails-2.3.3\lib\commands\console.rb to point to iirb.bat instead. That 
didn't work as well.
I continued and discovered that RubyProcess doesn't consider bat files as 
executables. I don't know if it's on purpose but in order to fix the problem, I 
added the bat extension to the valid executable extension list and set the full 
path of iirb.bat in rails' console.rb file.

Am I doing something wrong or is my little patch correct?

Thanks,
Shay.

--
--------------------------------------------------
Shay Friedman
Author of IronRuby Unleashed
http://www.IronShay.com
Follow me: http://twitter.com/ironshay
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to