Thursday, June 16, 2011

undefined method `except' for "":String

Environment:
Ruby 1.9.2 via rvm, Running phusion passenger with apache and nginx (had to setup virtual host as proxy to get this to run multiple versions of ruby), Rails 3.0.8, Datamapper via the dm-rails gem. Mac OS X.
Error Message:
undefined method `except' for "":String

Problem:
For me this was in my database.yml file. Don't really know what the issue was, but I'm guessing an extra space or tab some where in the defaults section of the database.yml file.

Fix:
All I did was delete the defaults section and of course added the adapter, username, password, host, etc to each corresponding section in the database.yml file.