Skip to content

Instantly share code, notes, and snippets.

@tobias
Created September 10, 2010 13:48
Show Gist options
  • Save tobias/573652 to your computer and use it in GitHub Desktop.
Save tobias/573652 to your computer and use it in GitHub Desktop.
NoMethodError - undefined method `debug' for "/dev/null":String:
./lib/sc-agent/helpers/exec-helper.rb:29:in `execute'
./lib/sc-agent/agent.rb:64:in `GET /status'
exec-helper.rb:29: @log.debug "Executing command: '#{command}'"
agent.rb:64: load = ExecHelper.new( :log => '/dev/null' ).execute('cat /proc/loadavg').strip.chomp
# you init @log in exec-helper like so:
exec-helper.rb:25: @log = options[:log] || Logger.new(STDOUT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment