My situation was this – Rails 2.0 app running on slicehost (ubuntu 8.04) in passenger mod_rails The goal was Dynamic PDF generation for a product catalog ( > 100 pages) This event had to be triggered from within the rails request / response cycle, but run outside of it I needed the simplest, fastest, more [...]
Category Archives: code
mod_rails set RAILS_ENV variable to QA, Staging, or Production
I’m using mod_rails with capistrano and multi-stage (qa, staging, production), and wrote this workaround so that the RAILS_ENV could be set correctly in each stage. Mod_rails sets RAILS_ENV once in the global server conf file, but I needed it set once for each environment: qa, staging, and production. I tried setting ENV['RAILS_ENV] in each file [...]
jQuery validation with Prototype
Here is the jQuery validation plugin fixed up so that it works if you have prototype installed along side jQuery. I just replaced references to $() with jQuery() in the jQuery.validations.js file. jquery.validate.js with prototype