0
votes

I recently deployed a Ruby on Rails 3 app (using a jruby RVM) to a new computer, using a differnet linux OS than I am used to. I ran my unit tests to make sure everything work, and the test aborted before it had (seemingly) even executed a single line of code.

To debug, I deleted all the tests out of my unit test folder, and added a single dummy test:

require 'test_helper'

class LineupTest < ActiveSupport::TestCase
  # Replace this with your real tests.
  test "the truth" do
    assert true
  end
end

And I STILL got the abortion. Specifically, the error I am seeing is:

rake test:units --trace (in /usr/local/labs/.staging/pcms1301944989)

which: no sudo in (/home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/bin:/home/labs/.rvm/gems/jruby-1.5.6@global/bin:/home/labs/.rvm/rubies/jruby-1.5.6/bin:/home/labs/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.4)

* Using highline effectively in JRuby requires manually installing the ffi-ncurses gem.

* jruby -S gem install ffi-ncurses

** Invoke test:units (first_time)

** Invoke test:prepare (first_time)

** Invoke db:test:prepare (first_time)

** Invoke db:abort_if_pending_migrations (first_time)

** Invoke environment (first_time)

** Execute environment

** Execute db:abort_if_pending_migrations

** Execute db:test:prepare

** Invoke db:test:load (first_time)

** Invoke db:test:purge (first_time)

** Invoke environment

** Execute db:test:purge

** Execute db:test:load

** Invoke db:schema:load (first_time)

** Invoke environment

** Execute db:schema:load

** Execute test:prepare

** Execute test:units which: no sudo in (/home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/bin:/home/labs/.rvm/gems/jruby-1.5.6@global/bin:/home/labs/.rvm/rubies/jruby-1.5.6/bin:/home/labs/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.4)

rake aborted! Command failed with status (1): [/home/labs/.rvm/rubies/jruby-1.5.6/bin/jru...]

/home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:995:in sh' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1010:in call' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1010:in sh' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1098:in sh' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1029:in ruby' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1098:in ruby' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/railties-3.0.3/lib/rails/test_unit/testing.rake:26:in define' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1112:in verbose' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/railties-3.0.3/lib/rails/test_unit/testing.rake:11:in define' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:636:in call' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:636:in execute' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:631:in each' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:631:in execute' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /home/labs/.rvm/rubies/jruby-1.5.6/lib/ruby/1.8/monitor.rb:191:in mon_synchronize' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2029:in each' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2001:in run' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/lib/rake.rb:1998:in run' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/bin/rake:31 /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/gems/rake-0.8.7/bin/rake:19:in `load' /home/labs/.rvm/gems/jruby-1.5.6@pcms_stable/bin/rake:19

1

1 Answers

0
votes

Turns out that "which no sudo" part was important. The OS didn't have sudo installed, and one of the gems (for some reason) required it. Installing sudo did the trick.