# Change to how igem, irdoc, and iri work (stuff in Merlin/Main/Languages/Ruby/Scripts/bin)

**URL:** <https://www.ruby-forum.com/t/change-to-how-igem-irdoc-and-iri-work-stuff-in-merlin-main-languages-ruby-scripts-bin/171371>\
**Category:** IronRuby\
**Created:** [July 1, 2009, 8:22am UTC](https://www.ruby-forum.com/t/change-to-how-igem-irdoc-and-iri-work-stuff-in-merlin-main-languages-ruby-scripts-bin/171371 "2009-07-01T08:22:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsoho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Post date:** [July 1, 2009, 8:22am UTC](https://www.ruby-forum.com/t/change-to-how-igem-irdoc-and-iri-work-stuff-in-merlin-main-languages-ruby-scripts-bin/171371/1 "2009-07-01T08:22:58Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![jsoho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Post date:** [September 16, 2009, 6:26am UTC](https://www.ruby-forum.com/t/change-to-how-igem-irdoc-and-iri-work-stuff-in-merlin-main-languages-ruby-scripts-bin/171371/2 "2009-09-16T06:26:47Z")

</div>

I ran dev.bat and nothing happened. No paths were created in windows  
environment.

---

<div class="post-metadata">

**Author:** ![jsoho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Post date:** [January 5, 2010, 2:00am UTC](https://www.ruby-forum.com/t/change-to-how-igem-irdoc-and-iri-work-stuff-in-merlin-main-languages-ruby-scripts-bin/171371/3 "2010-01-05T02:00:00Z")

</div>

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: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Jimmy  
Schementi  
Sent: Tuesday, June 30, 2009 11:19 PM  
To: ‘removed\_email\_address@domain.invalid’  
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](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
