Skip to content

Instantly share code, notes, and snippets.

View BrianTheCoder's full-sized avatar

Brian Smith BrianTheCoder

View GitHub Profile
For more on randexp read http://github.com/benburkert/randexp/tree/master/README.textile ....or else
# 2 3 4 5 6 7 8 9 10 A
# 5 H H H H H H H H H H
# 6 H H H H H H H H H H
# 7 H H H H H H H H H H
# 8 H H H H H H H H H H
# 9 H D D D D H H H H H
# 10 D D D D D D D D H H
# 11 D D D D D D D D D H
# 12 H H S S S H H H H H
# 13 S S S S S H H H H H
before :save do
[
:contents,
:venues,
:states,
:cities,
:zips
].each do |klass|
self.send(klass).entries
many_to_many_model = self.class.relationships[klass].child_model
migration 2, :new_image_handling do
up do
modify_table :users do
add_column :avatar_file_name, String, :length => 0..200, :nullable => true
add_column :avatar_content_type, String, :length => 0..200, :nullable => true
add_column :avatar_file_size, Integer
add_column :profile_image_file_name, String, :length => 0..200, :nullable => true
add_column :profile_image_content_type, String, :length => 0..200, :nullable => true
add_column :profile_image_file_size, Integer
end
/opt/local/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/dispatch/router/behavior.rb:333:in `namespace': The route has already been committed. Further options cannot be specified (Merb::Router::Behavior::Error)
from (eval):3:in `namespace'
from /Users/williamsmith/code/sites/feather/config/router.rb:32
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/dispatch/router/behavior.rb:507:in `instance_eval'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/dispatch/router/behavior.rb:507:in `with_proxy'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/dispatch/router.rb:58:in `prepare'
from /Users/williamsmith/code/sites/feather/config/router.rb:23
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/bootloader.rb:380:in `load'
from /opt/local/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/bootloader.rb:380:in `load_file'
... 11 levels...
require 'fastercsv'
class Reporter
# example action to return the contents
# of a table in CSV format
def export_users
users = User.find(:all)
stream_csv do |csv|
csv << ["email"]
Debugger enabled
Loading init file from /Users/williamsmith/code/sites/dp-site/config/init.rb
Loading /Users/williamsmith/code/sites/dp-site/config/environments/development.rb
~ Connecting to database...
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- /Users/williamsmith/code/sites/dp-site/gems/gems/dm-core-0.9.7/lib/dm-core/adapters/postgresql_adapter (LoadError)
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /Users/williamsmith/code/sites/dp-site/gems/gems/dm-core-0.9.7/lib/dm-core.rb:146:in `setup'
from /Users/williamsmith/code/sites/dp-site/gems/gems/merb_datamapper-0.9.10/lib/merb/orms/data_mapper/connection.rb:44:in `setup_connections'
from /Users/williamsmith/code/sites/dp-site/gems/gems/merb_datamapper-0.9.10/lib/merb/orms/data_mapper/connection.rb:27:in `connect'
from /Users/williamsmith/code/sites/dp-site/gems/gems/merb_datamapper-0.9.10/lib/merb_datamapper.rb:16:in `run'
/usr/lib64/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/abstract_adapter.rb:41:in `initialize': uninitialized constant DataObjects::URI (NameError)
from /usr/lib64/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/data_objects_adapter.rb:159:in `initialize'
from /usr/lib64/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core.rb:157:in `new'
from /usr/lib64/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core.rb:157:in `setup'
from /usr/lib64/ruby/gems/1.8/gems/merb_datamapper-0.9.11/lib/merb/orms/data_mapper/connection.rb:44:in `setup_connections'
from /usr/lib64/ruby/gems/1.8/gems/merb_datamapper-0.9.11/lib/merb/orms/data_mapper/connection.rb:27:in `connect'
from /usr/lib64/ruby/gems/1.8/gems/merb_datamapper-0.9.11/lib/merb_datamapper.rb:17:in `run'
from /usr/lib64/ruby/gems/1.8/gems/merb-core-0.9.11/lib/merb-core/bootloader.rb:99:in `run'
from /usr/lib64/ruby/gems/1.8/gems/merb-core-0.9.11/lib/merb-core/server.rb:171:in `bootup'
from /usr/lib64/ruby/gems/1.8/gems/merb-core-0.9.11/lib/merb-cor
triggering start callbacks for `deploy:cold'
* executing `multistage:ensure'
*** Defaulting to `staging'
* executing `staging'
* executing `deploy:cold'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
* executing "if [ -d /data/merb/localspoke/shared/cached-copy ]; then cd /data/merb/localspoke/shared/cached-copy && git fetch -q origin && git reset -q --hard 5764b55eb2525feb77d7b01ea83506bc3b44476e; else git clone -q [email protected]:downtowncartel/localspoke.git /data/merb/localspoke/shared/cached-copy && cd /data/merb/localspoke/shared/cached-copy && git checkout -q -b deploy 5764b55eb2525feb77d7b01ea83506bc3b44476e; fi"
ERROR: Error installing memcached:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb install memcached
checking for memcached_server_add() in -lmemcached... yes
checking for #include <libmemcached/memcached.h>
... yes
checking for #include <libmemcached/memcached_constants.h>
... yes
checking for #include <libmemcached/memcached_storage.h>