1

I'm using Ruby 1.9.2 and Rails 3.1.1 on Windows 7. I tried running a rake test command, but I keep getting this error:

`<top (required)>': MiniTest v1.6.0 is out of date. (RuntimeError)
`gem install minitest` and add `gem 'minitest' to you test helper.

I already tried using gem install minitest, I also added gem "minitest" to my gem file and ran bundle install. Nothing worked. I tried running bundle exec rake test, that failed too. I'm still getting the same error. My gem file has this:

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
  gem "minitest"
end

Any ideas where I've gone wrong? Full pastie of error: http://www.pastie.org/3214398

Running gem query returns this for minitest: minitest (2.10.1, 1.6.0)

I have found that several people have had this issue before, but none of the posted solutions have worked for me.

Community
  • 1
  • 1
Mohamad
  • 34,731
  • 32
  • 140
  • 219
  • I have seen this link hope it will help. http://stackoverflow.com/questions/7779467/how-do-i-add-gem-minitest-to-my-test-helper – piam Jan 19 '12 at 17:12
  • @paim, thanks for chiming in. I saw that to. As you can see my gem file has `gem "minitest"` already. It made no difference. – Mohamad Jan 19 '12 at 17:14

1 Answers1

1

I've seen two solutions to this: the first is gem uninstall minitest --version 1.6.0, and that'll make sure the only minitest you have is the most up-to-date one.

The second would be bundle exec rake test - that will run rake test using the gems specifically in your Gemfile.

Mark Tabler
  • 1,421
  • 10
  • 16
  • 1
    One thing I missed - in order for the `bundle exec` method to work, you'll need to specify in your Gemfile `gem "minitest", ">= 2.10"` so it would ignore the old minitest. – Mark Tabler Jan 19 '12 at 17:19