Skip to content

Category Archives: configuration

Making your Plugin or Gem configurable

Recently I added a configuration mechanism to Webrat. It was surprisingly easy, and mainly copied from rails core. I would suggest adding somthing like this to any plugin that has more than a few features or ones that users have asked to have turned off. First off you’re going to have to create the actual […]

generator_missing plugin release

I just posted my initial cut of my generator_missing plugin. This plugin is meant to be a repository of additional generators to help workflow. The current ones are: Library: Generates a non active record ruby object and a test class. lib/library_name.rb test/unit/library_name_test.rb Module: Generates a basic module under lib and its tests. lib/module_name.rb test/unit/module_name_test.rb, with […]

hiding production database info from source control with capistrano

Whether you are working on an open source app or an enterprise app, it is a good idea to keep the production database connection information out of source control. To do so, add the following to your deploy.rb file: task :overwrite_database_yml_file do run "[ -f /var/rails/#{application}/database.yml ] && cp -f /var/rails/#{application}/database.yml #{latest_release}/config/ || echo 'database.yml […]

ruby on rails (2.0.1, 2.0.2) and oracle on FC8

Get the following rpm’s from oracle oracle-instantclient-basic- oracle-instantclient-devel- (Note: this should work fine with the newer versions as well) As root cd PATH_TO_RPMS rpm -ivh oracle-instantclient-basic- oracle-instantclient-devel- echo /usr/lib/oracle/ > /etc/ This last step, the echo, is a bit of magic. The conf files in /etc/ are run before each command is invoked to set […]