Rack is a very lightweight specification that Ruby web servers can implement. This is middleware, which means that it is between a web server (such as a passenger) and Rails.
Rails Metal is a way to handle an HTTP request using Rails when you need maximum performance. It actually takes you to the metal and bypasses all the usual functions (and therefore the overhead) that the standard Rails request / response cycle gives you. Technically, Rails Metal is an implementation of a rack handler.
You can find these two Railscasts on topic informative:
You can get the middleware stack list for a Rails application with rake middleware
John topley
source share