Profiling JRuby with NetBeans A case study and tutorial on using the NetBeans profiler to profile Ruby code running on the JVM via JRuby. Walks through the steps of configuring NetBeans, launching JRuby with profiling settings, connecting NetBeans to JRuby, and analyzing the ...
Comparing Ruby exceptions to additional stat() test A common idiom in Ruby code (FileUtils, ActiveSupport, Hike) when dealing with a file or directory that may or may not exist is to go ahead and call a method that expects the file to exist (such as open), and catch the exception raised for nonexistent ...
ActiveRecord connection pool fairness ActiveRecord maintains a pool of database connections that may be used by multiple threads to perform database work. If many threads are contending for a smaller number of connections, the behavior of the connection pool becomes important. Read ...
Asynchronous responses in Rack Rack is an interface for Ruby components accepting and responding to HTTP requests synchronously. Though there is not an official Rack spec for asynchronous responses, Rack servers such as Rainbows! and Thin provide an asynchronous interface for ...
Recent Responses
Re: Comparing Ruby exceptions to additional stat() test Ethan, Thanks, this is an excellent point. I'd personally like to see a lower level file api that returns error codes, or perhaps one that accepts an error handler as a block. I'd been working on a proof-of-concept of such an api, but it is on the far ...
Re: Comparing Ruby exceptions to additional stat() test The problem with stat-ing a file before you open it is that there may be nonzero time between the two, in which time the file may have been deleted by somebody else. if you stat a file, another process deletes it, and then you open the file, you'll get an ...