Strange errors when upgrading merb

Wednesday 11/26/2008  –  Category: Merb

I had some strange errors when upgrading to the latest version of merb (1.1.3).  When trying to run

rake db:automigrate

I would get something like:

~ Connecting to database...
/opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/data_objects_adapter.rb:137:in `initialize': wrong number of arguments (8 for 1) (ArgumentError)
from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/data_objects_adapter.rb:137:in `new'
from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/data_objects_adapter.rb:137:in `normalize_uri'
from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/abstract_adapter.rb:44:in `initialize'
from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/data_objects_adapter.rb:159:in `initialize'
from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core.rb:157:in `new'
from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core.rb:157:in `setup'
from /opt/local/lib/ruby/gems/1.8/gems/merb_datamapper-1.0/lib/merb/orms/data_mapper/connection.rb:44:in `setup_connections'
from /opt/local/lib/ruby/gems/1.8/gems/merb_datamapper-1.0/lib/merb/orms/data_mapper/connection.rb:27:in `connect'
from /opt/local/lib/ruby/gems/1.8/gems/merb_datamapper-1.0/lib/merb_datamapper.rb:17:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core/bootloader.rb:99:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core/server.rb:172:in `bootup'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core/server.rb:42:in `start'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core.rb:169:in `start'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0/bin/merb:11
from /opt/local/bin/merb:19:in `load'
from /opt/local/bin/merb:19

After googling for awhile I found this post that suggested downgrading the addressable gem back to 1.0.4.  I tried doing that but stuff was still acting funky, it would say

FATAL: The gem dm-core (= 0.9.7, runtime), [] was not found

even though it was still there.  For some reason, doing sudo gem uninstall merb didn't clean up all the merb+other dependencies, so I had to start of clean by removing merb and all its dependencies:

sudo gem uninstall addressable data_objects datamapper dm-aggregates dm-migrations dm-sweatshop dm-timestamps dm-types dm-validations do_mysql do_sqlite3 merb-action-args merb-assets merb-auth merb-auth-core merb-auth-more merb-auth-slice-password merb-cache merb-core merb-exceptions merb-gen merb-haml merb-helpers merb-mailer merb-more merb-param-protection merb-slices merb_datamapper

After installing one more time, everything worked fine and dandy.  Sheesh, why can 'sudo gem update merb' play nice out of the box?

Leave a Reply