Jimmy Schementi
2010-Jan-05 00:51 UTC
[Ironruby-core] Change to how igem, irdoc, and iri work (stuff in Merlin/Main/Languages/Ruby/Scripts/bin)
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. http://github.com/ironruby/ironruby/tree/8d70f2bf7a2bae37ae7cb3ba5d3eca5fe54d46e1/Merlin/Main/Languages/Ruby/Scripts/bin. 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. ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100105/e994d9eb/attachment-0001.html>