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

Posted by Jimmy Schementi (Guest)
on 2009-07-01 08:22
(Received via mailing list)
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
Posted by Mohammad Azam (azamsharp)
on 2009-09-16 06:26
I ran dev.bat and nothing happened. No paths were created in windows 
environment.
Posted by Jimmy Schementi (Guest)
on 2010-01-05 02:00
(Received via mailing list)
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@rubyforge.org 
[mailto:ironruby-core-bounces@rubyforge.org] On Behalf Of Jimmy 
Schementi
Sent: Tuesday, June 30, 2009 11:19 PM
To: 'ironruby-core@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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.