[Ironruby-core] app.config file in a rails app

Tomas Matousek Tomas.Matousek at microsoft.com
Tue Apr 27 13:53:28 EDT 2010

A couple of options here.

1)      Use/create a .NET executable with app.config file. One option is to copy ir.exe to the root directory of your app and add ir.exe.config with appSettings that you need. Don't forget to change Ruby library paths in that ir.exe.config file. You'll also need to copy the rest of the assemblies from IronRuby bin directory to the same directory as ir.exe (or some subdirectory that you specify in <probing> element of ir.exe.config, see http://msdn.microsoft.com/en-us/library/823z9h8w(VS.80).aspx) or to the GAC (using gacutil.exe: http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx).

2)      Create an AppDomain that is set up to use the right config file: http://msdn.microsoft.com/en-us/library/system.appdomainsetup.configurationfile(v=VS.100).aspx. Then launch the entire rails application (script/server) in that AppDomain.


From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Chris Ortman
Sent: Tuesday, April 27, 2010 6:45 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] app.config file in a rails app

I am playing around with ir + rails and using it in front of a bunch of existing .NET code.
The .NET code really really wants a couple of settings in <appSettings>
When i run via script/server though the app.config file is ir.exe.config (AppDomain.Current.SetupInformation.ConfigurationFile)... is there a way to override what config file is loaded?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100427/974c72f2/attachment.html>

More information about the Ironruby-core mailing list