# FYI Code Review: rackupdate4

**URL:** <https://www.ruby-forum.com/t/fyi-code-review-rackupdate4/182210>\
**Category:** IronRuby\
**Created:** [January 25, 2010, 8:50am UTC](https://www.ruby-forum.com/t/fyi-code-review-rackupdate4/182210 "2010-01-25T08:50:15Z")\
**Posts on this page:** 1\
**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:** [January 25, 2010, 8:50am UTC](https://www.ruby-forum.com/t/fyi-code-review-rackupdate4/182210/1 "2010-01-25T08:50:15Z")

</div>

tfpt unshelve /shelveset:“rackupdate4;REDMOND\jimmysch”

Note: the diff has been truncated of adding a Rails example and a bunch  
of gems (see below).

* * *

Fixes for running rack-based applications

Ruby changes:

- Put ESPIPE class in Errno module; it was defined at top-level which is  
incorrect, and Sinatra’s error-reporting depends on it.
- Remove ‘hacks’ from irake; it doesn’t exist anymore

IronRuby.Rack changes:

- request.body is always a string
- rack.input should never have a null contents (eg. StringIO.new(nil)).
- rack.version should be set to Rack::VERSION, rather than hardcoded.
- Ruby errors shouldn’t be swallowed because the error handler threw
- Generate the rack env with Ruby types the first time around, and only  
execute Ruby code where needed.
- Make sure AppPath is a full path
- Lazy load web.config settings, and allow setting RACK\_ENV from  
web.config.
- Remove locks in HttpHandler and HttpHandlerFactory; may revert this  
change after speaking with the [ASP.NET](http://ASP.NET) team to better understand  
the request architecture.
- Requests are processed asynchronously
- Manually set TOPLEVEL\_BINDING since it’s not set automatically when  
IronRuby is embedded.
- Canonlicalize paths of files added to the load path, so Ruby files  
always show “/” as the path separator.
- Always log exceptions to ironrack.log, and only show them to the HTML  
page when RACK\_ENV is ‘development’.
- Update Rails example app, and run all examples in RACK\_ENV production  
mode.
- Add Rails example that uses ActiveRecord (IronRuby.RailsDB.Example)
- Update gems: rails 2.3.5, sinatra 0.9.4, ironruby-sqlserver 0.1.0,  
rspec 1.3.0, and make sure the executables are in the gembin dir.
- Add Microsoft.Dynamic.csproj to IronRuby.Rack.sln
- Update permissions instructions in README.
- Clean up little perf test, and add an actual test of IronRuby.Rack,  
though testing is still very lacking.
