Public Gists by wallace

Gravatar
Thu Nov 19 17:53:21 -0800 2009
1
2
3
(rdb:1) p association
INTERNAL ERROR!!! ActiveRecord::ConnectionNotEstablished
        /var/www/rails/rollbook/releases/20091118154734/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
Gravatar
Thu Nov 19 17:47:27 -0800 2009
1
2
3
  def QueueEntry.run_next_job
    queue_entry = QueueEntry.get_next_job_from_queue(QueueEntry.server_id)
 
Gravatar
Wed Nov 11 07:34:49 -0800 2009
1
2
3
➜ ~ sudo port installed
Password:
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
Gravatar
Tue Nov 03 11:30:14 -0800 2009
1
2
3
 SELECT name, lower(groups.name) FROM "groups" WHERE ("groups".account_id = 66) ORDER BY lower(name);
 
                                   name | lower
Gravatar
Tue Oct 06 14:21:05 -0700 2009
1
2
3
Processing CoursesController#blah (for 127.0.0.1 at 2009-10-06 21:22:06) [GET]
  Parameters: {"action"=>"blah", "controller"=>"courses"}
  Account Load (2.8ms) SELECT * FROM "accounts" WHERE ("accounts"."subdomain" = E'admin') LIMIT 1
Gravatar
Wed Sep 02 10:31:25 -0700 2009
1
2
3
create temp table temp_course_text_fields_and_summary_for_sfi_9_1_09 AS select c.code, c.type, c.id, c.in_catalog, c.summary, ctf.description, ctf.instructions from courses c join course_text_fields ctf on c.id = ctf.course_id where c.account_id = 67;
 
\copy temp_course_text_fields_and_summary_for_sfi_9_1_09 to 'sfi_course_text_fields_and_summary.csv' WITH CSV HEADER
Gravatar
Sat Jul 25 06:50:49 -0700 2009
1
2
3
# i create a symlink from file_name to its text.plain equivalent to keep the view
# shared between a text email and the web UI view DRY
#
Gravatar
Fri Jul 17 08:11:45 -0700 2009
1
2
3
<script language="JavaScript">
 
function Calculate(form){
Gravatar
Tue Jul 07 13:58:19 -0700 2009
1
2
3
# rails controller action renders text like this
render :text => "alert('#{messages}');"
 
Gravatar
Thu Jul 02 10:41:46 -0700 2009
1
2
3
  def list_sessions
    @category_id = params[:category_id]
    @course_id = params[:course_id] || ""
Gravatar
Tue Jun 23 08:37:05 -0700 2009
1
2
3
class StartUpWorker < BackgrounDRb::MetaWorker
  set_worker_name :start_up_worker
  QUEUE_WORKER_LIMIT = 2
Gravatar
Mon Jun 22 09:32:04 -0700 2009
1
2
3
>> activity_fields.zip(ar.first)
TypeError: can't convert Hash into Array
from (irb):45:in `zip'
Gravatar
Fri Jun 19 06:58:36 -0700 2009
1
2
3
# setup db and ami staging instances all set up w/stale volumes
-- complete
 
Gravatar
Fri Jun 12 07:56:08 -0700 2009
1
2
3
# line 83 of config/initializers/rollbook.rb is
# require 'validatable'
# which is a gem that is installed and the last line in the config/initializers/rollbook.rb
Gravatar
Thu Jun 04 12:42:05 -0700 2009
1
2
3
#! /bin/sh -e
# this script insures that on boot we have the latest version of the application deployed to this instance
# this must be run after the ec2-init script which sets the hostname. ec2-init is currently S90
Gravatar
Tue Jun 02 14:22:42 -0700 2009
1
2
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'config/deploy'
Gravatar
Tue Jun 02 14:21:18 -0700 2009
1
2
3
set :application, "appname"
set :repository, "defaultuser@githost.com:/store/git/appname/.git"
set :deploy_to, "/var/www/rails/#{application}"
Gravatar
Tue Jun 02 14:09:48 -0700 2009
1
2
3
root@domU-12-31-38-00-4C-31:~# cap -T
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/configuration/variables.rb:122:in `method_missing': undefined method `depend' for #<Capistrano::Configuration:0x7f443d3b6a90> (NoMethodError)
        from ./deploy.rb:72:in `load'
Gravatar
Sun May 24 07:32:36 -0700 2009
1
2
3
    week = []
    @weeks = []
    @days.each do |day|
Gravatar
Thu May 21 07:00:41 -0700 2009
1
2
3
# 'gem install pg' solved this problem for me.
 
rbadmin@ares current_rollbook % rake --trace db:migrate