blowmage/minitest-rails — Issue #20: uninitialized constant ActiveRecord::ActiveRecordError
Author: rosstimson
Created: 2012-01-29 19:05:34+00:00
State: open

Started a new Rails (3.2.1) project and omitted ActiveRecord since I'm using Mongoid. Running `rails g mini_test:install` resulted in:

```
$ rails g mini_test:install
/Users/rosstimson/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.1/lib/active_record/fixtures.rb:18:in `': uninitialized constant ActiveRecord::ActiveRecordError (NameError)
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0/gems/minitest-rails-0.0.1/lib/minitest-rails.rb:3:in `require'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0/gems/minitest-rails-0.0.1/lib/minitest-rails.rb:3:in `'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
from /Users/rosstimson/code/ruby/test-minitest_rails/config/application.rb:13:in `'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:24:in `require'
from /Users/rosstimson/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:24:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'
```

When ActiveRecord is included in a test Rails app I get:

$ rails g mini_test:install
Could not find generator mini_test:install.

This is similar to Issue #17 and including this (as mentioned by luishurtado) in your Gemfile seems to fix the issue:

gem 'minitest-rails',:git => "git@github.com:rawongithub/minitest-rails.git", :branch => "gemspec"

Would love to see some of the fixes and improvements in the rawongithub (https://github.com/rawongithub/minitest-rails) fork pulled into the main gem for the next release.