28 Apr 2012, 12:04
Generic-user-small

Troy (1 post)

I use rails 2.2.2,ruby 1.8.6.And I followed the guidelines in the book and deploy the Depot project.When I took unit testing and input the command in the cmd: ruby -I test test/unit/product_test.rb,I got an error as below: D:/InstantRails-2.0-win/rails_apps/GraduateDesign/depot/app/controllers/users_co ntroller.rb:48: warning: don’t put space before argument parentheses D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/acti ve_support/dependencies.rb:445:in load_missing_constant': uninitialized constan t RUBY_COPYRIGHT (NameError) from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2 .2.2/lib/active_support/dependencies.rb:77:in const_missing’ from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2 .2.2/lib/active_support/dependencies.rb:89:in const_missing' from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rbx-require-rel ative-0.0.9/lib/require_relative.rb:51 from D:/InstantRails-2.0-win/ruby/lib/ruby/site_ruby/1.8/rubygems/custom _require.rb:36:in gem_original_require’ from D:/InstantRails-2.0-win/ruby/lib/ruby/site_ruby/1.8/rubygems/custom _require.rb:36:in require' from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2 .2.2/lib/active_support/dependencies.rb:155:in require’ from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/linecache-0.45- x86-mswin32/lib/linecache.rb:66 from D:/InstantRails-2.0-win/ruby/lib/ruby/site_ruby/1.8/rubygems/custom _require.rb:31:in gem_original_require' ... 16 levels... from D:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2 .2.2/lib/active_support/dependencies.rb:155:in require’ from ./test/test_helper.rb:3 from test/unit/product_test.rb:1:in `require’ from test/unit/product_test.rb:1

Is there anything wrong when I was coding so that I got this error or is there any mistake in the test_helper file?

  You must be logged in to comment