我开始认为它是我正在使用 ruby-1.9.3-p125 的 ruby 版本,或者当你的新宝石很难分辨时。我正在根据《Agile Web Development with Rails 4th edition》一书构建一个购物车应用程序。如果有谁能提供帮助,我将不胜感激,谢谢
new-host:depot Tony$ rake test:units
/Users/Tony/work/depot/test/unit/product_test.rb:1:in `test': wrong number of arguments (1 for 2) (ArgumentError)
from /Users/Tony/work/depot/test/unit/product_test.rb:1:in `<top (required)>'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /Users/Tony/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [/Users/Tony/.rvm/rubies/ruby-1.9.3-p125...]