I just cloned the rails source code from github, and attempted to run the test suite… I got major failures:
patrick@vincent:~/coding/rails/rails(master)>bundle exec rake test --trace
** Invoke test (first_time)
** Execute test
/Users/patrick/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -w -I"lib:test" -I"/Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib" "/Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/**/*_test.rb"
/Users/patrick/coding/rails/rails/activesupport/lib/active_support/test_case.rb:20:in `<class:TestCase>': undefined method `register_spec_type' for ActiveSupport::TestCase:Class (NoMethodError)
from /Users/patrick/coding/rails/rails/activesupport/lib/active_support/test_case.rb:11:in `<module:ActiveSupport>'
from /Users/patrick/coding/rails/rails/activesupport/lib/active_support/test_case.rb:10:in `<top (required)>'
from /Users/patrick/coding/rails/rails/activesupport/test/benchmarkable_test.rb:3:in `<top (required)>'
from /Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
from /Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
from /Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
from /Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
from /Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /Users/patrick/.rvm/gems/ruby-1.9.2-p180@rails_patch/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [/Users/patrick/.rvm/rubies/ruby-1.9.2-p180...]
Tasks: TOP => test
(See full trace by running task with --trace)
And there’s a lot more similar error output after that which looks fairly identical so I won’t bother pasting it here…
Does anyone know how I can get these tests to run?
You are running under ruby 1.9.2. The rails master branch (aka Rails 4) requires ruby 1.9.3 or greater. The missing method
register_spec_typewill be resolved by ruby 1.9.3.I see you are using RVM, which is great. That will make upgrading to 1.9.3 easy…
Depending on how old your copy of RVM is, you may need to upgrade it with:
Then, make sure you have ruby 1.9.3 installed and that you are using it:
You will probably need to reinstall all the gems in the bundle:
Now you should be able to run the tests successfully with: