[Ironruby-core] Change to how igem, irdoc, and iri work (stuff in Merlin/Main/Languages/Ruby/Scripts/bin)
Jimmy.Schementi at microsoft.com
Mon Jan 4 19:51:58 EST 2010
This old proposal is no happening, as ir.exe will soon support "-S", which finds the file on your OS PATH, The bat files that are usually provided with MRI will be present for IronRuby in the bin directory (iirb, irdoc, iri, and igem), but any other gem that installs a command-line launcher (rake, rails, spec, ...), will be run without a batch file like so: "ir -S rake"; "rake" will be looked up on the OS PATH.
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi
Sent: Tuesday, June 30, 2009 11:19 PM
To: 'ironruby-core at rubyforge.org'
Subject: [Ironruby-core] Change to how igem, irdoc, and iri work (stuff in Merlin/Main/Languages/Ruby/Scripts/bin)
Currently the IronRuby git repo has copied versions of irb.bat, rdoc.bat, etc checked in as iirb, irdoc, etc to give shortcuts to running these popular Ruby utility scripts from IronRuby just as you do from Ruby.
They currently aren't copied to the build location, so you'll have to add this path to your PATH to call them.
Is anyone opposed to having dev.bat add Merlin/Main/Bin/Debug and Merlin/Main/Bin/Release to the path, and have a post-build step copy the necessary bat files (irdoc, iri, iirb, igem) to the build directory? This means no adding anything to the PATH; just run dev.bat and "brbr", and then "ir.exe" will resolve to Merlin/Main/Bin/Release/ir.exe. There might be a good reason for it, but having things on the PATH is pretty standard. =P
FYI, these executable scripts don't just originate from Ruby itself ... libraries and gems can install them as well, as rubygems, rails, rake, rack, and a ton other libraries do. IronRuby provides some of these files as well (irails, igem) since they hardcode "ruby.exe" in the bat files (actually, that's how it used to be, might have changed now that jruby is around), but it can never provide all of them. Ideally all gems that drop an executable next to "ir.exe" will check the ruby executable name (found in rbconfig.rb) and generate the bat file correctly.
The reason I'd like to only look for ir.exe in the build directories is that each bat files has some special logic to check to see if it's running in the development environment, and if so run Merlin/Main/Bin/Debug/ir.exe. While this is limiting since you can't easily use a release build, it also will be busted for any library that installs itself correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core