Every rails command, rails server included seems to fail when cancan is installed.
The error is always:
/Library/Ruby/Gems/1.8/bundler/gems/cancan-ff13a82ddabd/lib/cancan/model_adapters/mongoid_adapter.rb:47: uninitialized constant Mongoid::Document (NameError)
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
gem 'rails', '3.0.5'
gem 'will_paginate', '~> 3.0.pre2'
gem 'data_table', '>= 0.1.9'
gem 'compass', '>= 0.10.6'
Hmm, it should only be loading the Mongoid adapter if Mongoid is available, which doesn't look like the case here unless one of the other gems is defining the Mongoid constant.
Try commenting out CanCan in your Gemfile, run bundle, start up rails console and then type Mongoid. Let me know what it says. It should give an error saying constant is undefined unless something is defining it.
I looked into it and it appears that the data_table gem is the problem. It's defining the Mongoid module which makes CanCan think Mongoid is loaded. For now try putting gem 'data_table under gem 'cancan' and see if that works. I'll update CanCan to actually check that Mongoid::Document is defined.
ensure Mongoid::Document is defined before loading Mongoid adapter - …