[Ironruby-core] IronRuby.Rack how to debug?

Jimmy Schementi Jimmy.Schementi at microsoft.com
Wed Mar 31 01:32:14 EDT 2010


When using IronRuby.Rack and debugging the ruby code running, keep a few things in mind:

1.       Enable debug mode for DLR code in your app’s web.config (in the Microsoft.Scripting section).

2.       Because VS breakpoints in blocks don’t work yet, using Debug.Assert will do the job.

3.       IIS has a timeout of 60 seconds per request, which can be annoying when debugging. In the AppPool configuration that your application is running in try to max the timeout out so the process you want to debug stays around.

4.       Use WinDBG if you want to “man up”, but the VS debugger will be just fine.

Ivan, your “No route matches "/mocktwitter" with {:method=>:get}” error is because you need to tell Rails what the root directory on the web-server is so it can route appropriately. To see how to do this, look at the IronRuby.Rails.Example environment.rb<http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Hosts/IronRuby.Rack/IronRuby.Rails.Example/config/environment.rb#L10>:

Rails::Initializer.run do |config|
  config.action_controller.relative_url_root = "/IronRuby.Rails.Example" if ENV['RACK_ENV'] == 'production'
  # …

Also, I usually set up a separate AppPool, and set it to run as a specific Windows user, so I can grant read-only permissions to that user for the Ruby stdlib/gems, and read-write access for the app. Then you don’t have to grant permissions to IIS_IUSRS for all your stuff.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100331/86ea8aa2/attachment-0001.html>

More information about the Ironruby-core mailing list