Archive for February 2010
Implementing GCal4Ruby with Google AuthSub
On a side project I'm working on, StudentPlanr, we needed the ability to use Google AuthSub for a little more security than passing a username/password in the clear. I have used the gCal4Ruby gem in the past (by Mike Reich) and loved the ease of use and simple interface to interact with Google Calendar.
Today, I coded up a way for gCal4Ruby to use AuthSub and now everything is up and running. I'll be cleaning up some code and adding in things that are useful to the StudentPlanr project, so feel free to check it out. Hope it will be useful for your projects.
Feel free to fork and contribute:
How to Bundler 0.9.5, Rails 2.3.5, and running on Heroku
So Heroku recently updated to the latest Bundler this week. I did the update locally, did all the Gemfile changes, and pushed to heroku… moments later my app died! Now I should have pushed it to a new heroku app instance so I didn't bring down a production app, so lesson learned.
I put together my notes on what I needed to get everything back up and running smoothly as well as getting my local setup working:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# put this directly above the Rails.boot! line class Rails::Boot def run load_initializer extend_environment Rails::Initializer.run(:set_load_path) end def extend_environment Rails::Initializer.class_eval do old_load = instance_method(:load_environment) define_method(:load_environment) do Bundler.require :default, RAILS_ENV old_load.bind(self).call end end end end |
I'm running Snow Leopard, Bundler 0.9.5, Rails 2.3.5, and use SQLite for my production DB.