Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running rails core tests

I'd like to make a contribution to the rails project, but am stumbling at the first hurdle... I've cloned the rails repository and am getting an error when trying to run the unit tests.

$ bundle exec rake test
...
/home/me/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/minitest/spec.rb:131:in `register_spec_type': wrong number of arguments (1 for 2) (ArgumentError)

I'm using:

  • rvm with ruby ruby-1.9.3-preview1 (1.9.2 told me there was an incompatibility with rails 4)
  • rake-0.9.2.2
  • latest github commit tried: 211174a
  • (ubuntu)

Just to double check:

$ ruby -v
ruby 1.9.3dev (2011-07-31 revision 32789) [i686-linux]

I've read and did not find any info in http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html

Have also completely reinstalled rvm, recompiled ruby, and replaced all gems multiple times.

like image 849
Jason Avatar asked Nov 14 '22 11:11

Jason


1 Answers

The master branch of Rails is now the beta version for 4.0.0 and removes support for Ruby 1.8.7. I don't know exactly why it doesn't work with Ruby 1.9.3 preview, but I would recommend always running with the latest stable version of Ruby. Another option is to try running the tests in Ruby 1.9.2 and see if you get any errors.

like image 79
Peter Brown Avatar answered Dec 06 '22 23:12

Peter Brown