-
Mac OS X Mavericks, rbenv, and ruby-build “Missing the OpenSSL lib?”
openssl version: 1.0.1i, rbenv version: 0.4.0, ruby-build as plugin in the ~/.rbenv/plugins directory. The version of openssl on a Mavericks machine got out of sync with rbenv and ruby-build for some reason. For every attempt at installing a ruby version through rbenv attempted, we got the following message: “The Ruby openssl extension was not compiled.…
-
Refinements in Ruby: in map: super: no superclass method
I was trying out refinements to see if they would help clean up some parsing code. I liked defining a couple of methods for the String class to respond to, but really didn’t want them as permanent monkey patches on String. And so, I had a pipe mapping module with refinements: module PipeMapping refine String…
-
Serving a file from your Rails app from another server protected by basic authentication
Interesting problem: Retrieve a document from one web service protected by basic auth (or some authentication mechanism) and serve it via a public link on another website. It ended up boiling down to this code in the controller (reduced to be in the same method instead of factored out as it was.) def get_download response…