Monthly Archives: April 2008

Fix for “sslv3 alert handshake failure (OpenSSL::SSL::SSLError)”

If you are using the ruby httpclient library (v2.1.2) and getting an SSL error similar to /path/to/httpclient-2.1.2/lib/httpclient.rb:1039:in `connect': sslv3 alert handshake failure (OpenSSL::SSL::SSLError) then there are (at least) two possible solutions to this.
Posted in programming | Tagged , , , , | Leave a comment

Chaining :include’s in Rails to reduce the number of SQL queries

Say you have the following data model and you want to execute a single query that returns all the data at once within the ActiveRecord tables, with the proper rails associations between them. Wouldn’t it be nice if you could do something like A.find(:all, :include => :b => :c => :d => :e) #v1 ? Though this is [...]
Posted in programming, rails, scalability | Tagged , , , , , , , | Leave a comment

the symlink trick

Courtenay writes on scaling rails applications at Caboo.se. He says: Take a look at your logs: are you performing over 10 database calls per request? You need to fix this. Are you performing over 90? You’re a dumba**. Today viewed the logs of a rails application I am writing. To calculate one particular page [...]
Posted in deployment, rails, scalability | 2 Comments