Skip to content

Instantly share code, notes, and snippets.

View jshow's full-sized avatar

Jodi Showers jshow

  • peterborough, ontario
View GitHub Profile
@jshow
jshow / enhanced recurring-delayed-job-with-cron
Created March 23, 2013 15:14
# create delayed_job entries without rails # # based on this http://aaronvb.com/articles/28-recurring-delayed-job-with-cron # enhanced to # take a params hash # read database.yml # delayed_job queue # use: # */30 * * * cd /path/to/current && RAILS_ENV=production /path/to/current/lib/delayed_job_cron_jobs/create_delayed_job.rb --model "MadmimiMan…
require 'rubygems'
require 'mysql'
require 'yaml'
require 'optparse'
def usage(s)
$stderr.puts(s)
$stderr.puts("Usage: #{File.basename($0)}: [-l <logfile] [-q] file ...")
exit(2)
end
@jshow
jshow / valgrind.log
Created April 4, 2012 01:03
valgrind - aaron
deploy@homeclone/var/www/apps/boogala/releases/20120404140445 $ valgrind --num-callers=50 --error-limit=no --partial-loads-ok=yes --undef-value-errors=no rake RAILS_ENV=new_staging assets:precompile
==4623== Memcheck, a memory error detector
==4623== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==4623== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==4623== Command: /home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/bin/rake RAILS_ENV=new_staging assets:precompile
==4623==
/home/deploy/.rvm/rubies/ruby-1.9.3-p125/bin/ruby /home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/bin/rake assets:precompile:all RAILS_ENV=new_staging RAILS_GROUPS=assets
/home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/ruby/1.9.1/gems/logging-1.7.0/lib/logging/logger.rb:100: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
@jshow
jshow / valgrind.log
Created April 3, 2012 02:09
valgrind
$ valgrind /home/deploy/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -Iext:test /home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/bin/bundle exec rake RAILS_ENV=new_staging assets:precompile
/home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/ruby/1.9.1/gems/logging-1.7.0/lib/logging/logger.rb:100: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0020 p:0008 s:0068 b:0067 l:000056 d:000066 BLOCK /home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/ruby/1.9.1/gems/logging-1.7.0/lib/logging/logger.rb:100
c:0019 p:---- s:0062 b:0062 l:000061 d:000061 FINISH
c:0018 p:---- s:0060 b:0060 l:000059 d:000059 CFUNC :each
c:0017 p:0022 s:0057 b:0057 l:000056 d:000056 METHOD /home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/ruby/1.9.1/gems/logging-1.7.0/lib/logging/logger.rb:99
@jshow
jshow / bt.log
Created April 2, 2012 18:48
backtrace
Program received signal SIGSEGV, Segmentation fault.
st_lookup (table=0x0, key=792, value=0x7fffffffc858) at st.c:330
330 if (table->entries_packed) {
(gdb) generate-core-file
Saved corefile core.7737
(gdb) bt
#0 st_lookup (table=0x0, key=792, value=0x7fffffffc858) at st.c:330
#1 0x00007ffff7b1629f in search_method (recv=<value optimized out>, mid=792) at vm_method.c:374
#2 rb_method_entry_get_without_cache (recv=<value optimized out>, mid=792) at vm_method.c:393
#3 rb_method_entry (recv=<value optimized out>, mid=792) at vm_method.c:426
@jshow
jshow / crash.log
Created March 30, 2012 19:53
RAILS_ENV=new_staging bundle exec rake assets:precompile --trace
deploy@homeclone/var/www/apps/boogala/releases/20120330210526 $ cd /var/www/apps/boogala/releases/20120330210526 && RAILS_ENV=new_staging bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/deploy/.rvm/rubies/ruby-1.9.3-p125/bin/ruby /home/deploy/.rvm/gems/ruby-1.9.3-p125@boogala/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=new_staging RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)