Ruby on Rails problems & solutions, Dec 7, 2010

December 8, 2010

openjdk-6-jre-headless install/updates hang on AWS micro instance

This JRE is required for the AWS ec2 tools.  Isn’t that special.  Ergo, AWS micro instance is currently useless for any automated deployments.  AWS small, here we come.

Haversine formula for Ruby

I’m sure some of you are scratching your heads, thinking “Haversine” ?  Distance (great circle) between 2 lat/long locations.  I’m using a database that GeoKit doesn’t support (Oracle), and I don’t have access to the SDO indices, so…

And then my personal fav of the day:

Ajax File Uploads… fugetaboutit!

Ok, the rest of you probably knew this, but I didn’t.  For security reasons, Javascript doesn’t have access to your file input fields.  This means you can’t include them in a remote form.  Arrrrgggghhhh!  The hunt for a solution led us thru these options.

} else { $('#cookie-notice').show(); } $('#cookie-notice-accept').click(function() { createCookie('cookie-notice-dismissed','true',365); // Change from 1 month to 1 year. $('#cookie-notice').hide(); });