I'm trying to set up autotest on Ubuntu, and no matter what my configuration, I get this:

loading autotest/rails_rspec2
style: RailsRspec2
/home/brian/.rvm/gems/ruby-1.9.2-rc2@rails3tutorial/gems/redgreen-1.2.2/lib/redgreen/autotest.rb:6:in `<top (required)>': uninitialized constant Object::PLATFORM (NameError)

the .autotest (~/.autotest) file I have is as follows:

#!/usr/bin/env ruby
require 'redgreen/autotest'
def self.notify title, msg, img, pri='low', time=3000
`notify-send -i #{img} -u #{pri} -t #{time} '#{msg}'`
Autotest.add_hook :ran_command do |at|
results = [at.results].flatten.join("\n")
output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?(,\s*(\d+)\s+pending)?/)
folder = "~/Pictures/autotest/"
if output =~ /([123456789]|[\d]{2,})\sfailures?/
notify "FAIL:", "#{output}", folder+"rails_fail.png", 'critical', 10000
elsif output =~ /[1-9]\d*\spending?/
notify "PENDING:", "#{output}", folder+"rails_pending.png", 'normal', 10000
notify "PASS:", "#{output}", folder+"rails_ok.png"

what am I doing wrong here?

1 Answer 1


I had the same problem.

I just removed require 'redgreen/autotest' from ~/.autotest, and if you are using bundler, you should remove gem 'redgreen' also.

I didn't investigate more on this issue...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .