nonstic Random snippets of mac and rails goodness

Posts Tagged Ruby, Rails

Chaining Javascript OnLoad Event Handlers (or How to Use the YM4R Plug-in and FancyZoom together in a Rails App)

I was building a Rails application today, and wanted to include Google Maps integration and use the FancyZoom Javascript library on the same page. These two javascript libraries both depend on being instantiated as part of the onload Event Handler. Normally, you load FancyZoom in the body tag thusly: <body onload=”setupZoom();”> However, if you have [...]


Fixing RedCloth (undefined method `textilize') Errors on Shared Hosts

Symptom: You’ve developed a Rails app utilizing the RedCloth “textilize” method to apply the textile filter to to text field. eg. <%= textilize @post.body %> You may have the “RedCloth” gem installed, or unpacked to /vendor. This app works fine on your local Mac workstation. When you try to run your app in Production mode [...]


Updating Gems for Rails 2.1 on Slicehost

As part of deploying a new app to my Slicehost account, I needed to update the Rails gem to 2.1. When I ran sudo gem update to update all my installed gems, the process just sat there. I waited patiently for 10 minutes, and then 15, but nothing ever happened. I thought maybe there was [...]