Archive for December, 2007
Fix for “uninitialized constant Gem::GemRunner (NameError)”
Monday, December 31st, 2007I tried upgrading my version of rubygems to the most current version by running
sudo gem update –system
Which introduced this error:
/usr/bin/gem:23: uninitialized constant Gem::GemRunner(NameError)
whenever I tried to run rubygems. On the rails forum, I found a fix for it!
Simply add the line to the file /usr/bin/gem (may be different on a mac)
require ‘rubygems/gem_runner’
after
require ‘rubygems’
This fixed […]
Delete Vs. Destroy In Rails
Friday, December 21st, 2007I’ve been writing this web app that has the following models: Order, Recipient, Message. An order has many recipients and a recipient has many messages. The recipients are also dependent upon the order and the messages are dependent upon the recipient.
In Ruby code this looks like:
Order.rb
class Order < ActiveRecord::Base
has_many :recipients, :dependent => :destroy
has_many […]

