从 github 下载 mongoid 后,在虚拟机执行: root@precise32:/vagrant/mongoid# rspec spec/
执行失败,报错信息:
/usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:386:in load': /vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:273: syntax error, unexpected ':', expecting tASSOC (SyntaxError)
conflicts: { "$pushAll" =>
^
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:279: syntax error, unexpected '}', expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:286: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:290: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:303: syntax error, unexpected ':', expecting tASSOC
conflicts: { "$pushAll" =>
^
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:309: syntax error, unexpected '}', expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:316: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:320: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:333: syntax error, unexpected ':', expecting tASSOC
conflicts: { "$pushAll" =>
^
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:339: syntax error, unexpected '}', expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:354: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:369: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:396: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:400: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:416: syntax error, unexpected ':', expecting tASSOC
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:418: syntax error, unexpected '}', expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:431: syntax error, unexpected kDO_BLOCK, expecting kEND
/vagrant/mongoid/spec/mongoid/atomic/modifiers_spec.rb:456: syntax error, unexpected $end, expecting kEND
from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:386:in
load_spec_files'
from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:386:in map'
from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:386:in
load_spec_files'
from /usr/lib/ruby/vendor_ruby/rspec/core/command_line.rb:18:in run'
from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:55:in
run_in_process'
from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:46:in run'
from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:10:in
autorun'
from /usr/bin/rspec:4
这个是因为我下的版本不对吗?。。我是用的 v4.0.0.beta1 的分支:git checkout -b explore-mongoid v4.0.0.beta1