Skip to content

Instantly share code, notes, and snippets.

# @api public
def controller_name()
------- BECOMES -------
def controller_name() # :api_public:
2008-10-13 10:16 $ thor merb:tasks:setup
WARNING: unable to load thorfile "/Users/rob/cs/tmp/merb.thor": Merb is not a module
Located thor in gem cache...
Successfully installed thor-0.9.6
Located rake in gem cache...
Successfully installed rake-0.8.1
Located rspec in gem cache...
Successfully installed rspec-1.1.8
Adding local executable /Users/rob/cs/tmp/bin/thor
Adding local executable /Users/rob/cs/tmp/bin/rake2thor
=erl_crash_dump:0.1
Tue Oct 14 17:02:46 2008
Slogan: init terminating in do_boot ()
System version: Erlang (BEAM) emulator version 5.6.4 [source] [async-threads:0] [kernel-poll:true]
Compiled: Tue Oct 14 16:39:10 2008
Atoms: 5732
=memory
total: 3086984
processes: 459392
processes_used: 455448
2008-10-15 00:04 $ sudo /usr/local/bin/couchdb
Apache CouchDB 0.9.0a704727-incubating (LogLevel=info) is starting.
[error] [<0.58.0>] {error_report,<0.21.0>,
{<0.58.0>,crash_report,
[[{pid,<0.58.0>},
{registered_name,couch_httpd},
{error_info,
{exit,eaddrinuse,[{gen_server,init_it,6},{proc_lib,init_p,5}]}},
{initial_call,
{gen,init_it,
$: << File.join("doc")
require 'rubygems'
require 'rdoc/rdoc'
require 'fileutils'
require 'erb'
module Merb
class GemNotFoundException < Exception
end
require 'couchrest'
CouchRest::Model.default_database = CouchRest.database!("http://localhost:5984/test")
class CategoryList < CouchRest::Model
key_accessor :categories
cast :categories, :as => ["Category"]
end
function depth_first_categories(category){
category.categories.forEach(function(category){
emit(category.name, category);
depth_first_categories(category);
}
}
function(doc) {
if (doc['couchrest-type'] == 'CategoryList' && doc.categories) {
doc.categories.forEach(function(category){
depth_first_categories(category);
2008-11-07 07:18 $ merb -c 3
~ In 36448
2008-11-07 07:18 $ ps -ef | grep merb
501 36448 1 0 0:00.31 ?? 0:00.95 merb : merb : master MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/share/man BALYHIGH=66.219.59.233
501 36451 36448 0 0:00.21 ?? 0:00.57 merb : spawner (ports 4000) MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/share/man BALYHIGH=66.219.59.233
501 36452 36451 0 0:00.01 ?? 0:00.01 merb : worker (port 4000) MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/share/man BALYHIGH=66.219.59.233
501 36453 36451 0 0:00.01 ?? 0:00.01 merb : worker (port 4001) MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/share/man BALYHIGH=66.219.59.233
501 36454 36451 0 0:00.01 ?? 0:00.01 merb : worker (port 4002) MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/share/man BALYHIGH=66.219.59.233
2008-11-13 13:57 $ ./bin/rake spec:request --trace
(in /Users/rob/work/assay_depot/depot-catalog-slice)
/Users/rob/work/assay_depot/depot-catalog-slice/gems/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
** Invoke spec:request (first_time)
** Execute spec:request
Standard REXML library is slow. Please consider installing nokogiri.
Use "sudo gem install nokogiri"
rake aborted!
Command /opt/local/bin/ruby -I"/Users/rob/work/assay_depot/depot-catalog-slice/gems/gems/rspec-1.1.11/lib" "/Users/rob/work/assay_depot/depot-catalog-slice/gems/gems/rspec-1.1.11/bin/spec" "spec/requests/categories_spec.rb" "spec/requests/main_spec.rb" --color --format specdoc failed
/Users/rob/work/assay_depot/depot-catalog-slice/gems/gems/rspec-1.1.11/lib/spec/rake/spectask.rb:177:in `define'
/Users/rob/work/ecrowds/trunk/vendor/rails/activerecord/lib/active_record/base.rb:1833:in `method_missing_without_paginate': undefined method `has_security_policy?' for #<Class:0x59954a8> (NoMethodError)
from /Users/rob/work/ecrowds/trunk/vendor/gems/mislav-will_paginate-2.3.2/lib/will_paginate/finder.rb:164:in `method_missing'
from /Users/rob/work/ecrowds/trunk/lib/active_record/crud.rb:362:in `send'
from /Users/rob/work/ecrowds/trunk/lib/active_record/crud.rb:362:in `basic_attributes_from_original'
from /Users/rob/work/ecrowds/trunk/lib/active_record/crud.rb:361:in `each'
from /Users/rob/work/ecrowds/trunk/lib/active_record/crud.rb:361:in `basic_attributes_from_original'
from /Users/rob/work/ecrowds/trunk/vendor/gems/acts_as_versioned-0.2.3/lib/acts_as_versioned.rb:269:in `acts_as_versioned'
from /Users/rob/work/ecrowds/trunk/vendor/gems/acts_as_versioned-0.2.3/lib/acts_as_versioned.rb:267:in `class_eval'
from /Users/rob/work/ecrowds/tr