NoamB/sorcery — Issue #128: Sorcery Generator fail, when using Mongoid
Author: Nerian
Created: 2011-10-30 19:39:12+00:00
State: open

* Rails 3.1
* Mongoid

````ruby
➜ sparkle_share_web git:(master) ✗ rails generate sorcery:install
create config/initializers/sorcery.rb
generate model User --skip-migration
invoke mongoid
create app/models/user.rb
invoke rspec
create spec/models/user_spec.rb
invoke fabrication
create spec/fabricators/user_fabricator.rb
insert app/models/user.rb
/Users/Nerian/.rvm/gems/ruby-1.9.3-p0@sparkleshare-web/gems/sorcery-0.7.4/lib/generators/sorcery/install_generator.rb:56:in `next_migration_number': uninitialized constant Sorcery::Generators::InstallGenerator::ActiveRecord (NameError)
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@sparkleshare-web/gems/railties-3.1.1/lib/rails/generators/migration.rb:49:in `migration_template'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@sparkleshare-web/gems/sorcery-0.7.4/lib/generators/sorcery/install_generator.rb:51:in `copy_migration_files'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@global/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@sparkleshare-web/gems/railties-3.1.1/lib/rails/generators.rb:168:in `invoke'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@sparkleshare-web/gems/railties-3.1.1/lib/rails/commands/generate.rb:12:in `'
from /Users/Nerian/.rvm/gems/ruby-1.9.3-p0@sparkleshare-web/gems/railties-3.1.1/lib/rails/commands.rb:28:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'
```