publiclab/plots2

cloud9 vm install generates many gem warnings on rake test

jywarren opened this issue · 4 comments

Running rake test on this in cloud9 passes, but there are lots of unrelated external warnings from the gems; these warnings are not shown when running this locally. Running: rake test > test.log can be used to view just the test results in a file.

Asked for how to suppress these warnings here: http://stackoverflow.com/questions/36185485/exclude-external-gem-warnings-when-running-rake-test-in-rails

I was running it based on the README.md's cloud9 install process, and while tests did all pass, you can't see them easily due to the warnings.

My test machine is here: https://c9.io/jywarren/plots2-sqlite/

Excerpted from SO here:

I'm trying to set up a cloud9 (https://c9.io) test install of my Rails 3.2 app, so that new developers can quickly get it up and running for submitting changes and running tests. All my tests pass, but they're mixed in with many many warnings related to different gems:

Loaded suite /usr/local/rvm/gems/ruby-2.1.2/gems/rake-11.1.1/lib/rake/rake_test_loader
Started
......

Finished in 0.22973343 seconds.
------
6 tests, 10 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
------
26.12 tests/s, 43.53 assertions/s
Loaded suite /usr/local/rvm/gems/ruby-2.1.2/gems/rake-11.1.1/lib/rake/rake_test_loader
Started
............................................

Finished in 4.18306875 seconds.
------
44 tests, 77 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/local/rvm/gems/ruby-2.1.2/gems/composite_primary_keys-5.0.14/lib/composite_primary_keys/relation.rb:26: warning: previous definition of destroy was here
/usr/local/rvm/gems/ruby-2.1.2/gems/composite_primary_keys-5.0.14/lib/composite_primary_keys/relation.rb:10: warning: method redefined; discarding old delete
/usr/local/rvm/gems/ruby-2.1.2/gems/composite_primary_keys-5.0.14/lib/composite_primary_keys/relation.rb:10: warning: previous definition of delete was here
/usr/local/rvm/gems/ruby-2.1.2/gems/composite_primary_keys-5.0.14/lib/composite_primary_keys/relation.rb:26: warning: method redefined; discarding old destroy

... it continues and generates warnings for lots of other gems.

On my own Ubuntu/Debian machines, I don't see these warnings, and they make it hard to see the test results that are now interspersed among dozens of other lines of warnings.

Is there a way to suppress the warnings or configure my tests so that they don't trigger this level of verbosity?

There is -- RUBYOPT=W0 rake test:units -- but we should perhaps reduce the warnings, too?

@jywarren Is this problem still happening? I don't see these warnings in my cloud9 machine.

If not then let's close this; the Jun 24th link is helpful if it recurs. Thanks!