Skip to content

Instantly share code, notes, and snippets.

chino ~: sudo gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/usr/lib/ruby/gems/1.8/gems/nokogiri-1.0.2/lib RUBYLIBDIR=/usr/lib/ruby/gems/1.8/gems/nokogiri-1.0.2/lib
(in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.0.2)
/usr/lib/ruby/gems/1.8/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.
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... no
%w[rubygems exceptional].each { |lib| require lib }
Exceptional.api_key = 'my_api_key'
module Exceptional
def self.handle_rake(exception)
e = Exceptional.parse(exception)
e.framework = "rake"
e.occurred_at = Time.now.strftime("%Y%m%d %H:%M:%S %Z")
get '/styles.css' do
content_type 'text/css', :charset => 'utf-8'
sass :styles
end
@jc00ke
jc00ke / gist:200152
Created October 2, 2009 21:28
member select before max/group by
members = db[:customer].
select( :customer__id,
:customer__firstname,
:customer__lastname,
:customer__emailaddress,
:customer__address,
:customer__city,
:customer__state,
:customer__zip,
:customer__customdate1___expirationdate,
@jc00ke
jc00ke / gist:200163
Created October 2, 2009 21:30
member select with max/group by
members = db[:customer].
select( :customer__id,
:customer__firstname,
:customer__lastname,
:customer__emailaddress,
:customer__address,
:customer__city,
:customer__state,
:customer__zip,
:customer__customdate1___expirationdate,
@jc00ke
jc00ke / gist:200166
Created October 2, 2009 21:33
annual member query
SELECT DISTINCT
[CUSTOMER].[ID],
[CUSTOMER].[CUSTOMDATE1] AS [EXPIRATIONDATE],
MAX([TRANSACTION].[TIME]) AS [PURCHASEDATE],
(CASE [ITEM].[ID] WHEN 153 THEN N'child' WHEN 154 THEN N'senior' WHEN 588 THEN N'fitness' WHEN 589 THEN N'fitness' ELSE N'annual' END) AS [MEMBERSHIPTYPE]
FROM
[CUSTOMER] INNER JOIN [TRANSACTION] ON
([CUSTOMER].[ID] = [TRANSACTION].[CUSTOMERID]) INNER JOIN [TRANSACTIONENTRY] ON
([TRANSACTION].[TRANSACTIONNUMBER] = [TRANSACTIONENTRY].[TRANSACTIONNUMBER]) INNER JOIN [ITEM] ON
([TRANSACTIONENTRY].[ITEMID] = [ITEM].[ID])
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
module UserSpecHelper
def valid_user_attributes
{ :username => 'jc00ke',
:email => '[email protected]',
:password => 'p@ssw0rd' }
end
def invalid_usernames
maynard ~/bin/MagLev-installer : ./installMaglev.sh 22578
[Info] Starting installation of MagLev-22578.Linux on maynard
[sudo] password for jesse:
Fri Nov 20 23:52:36 PST 2009
[Info] Setting up shared memory
Total memory available is 3926 MB
Max shared memory segment size is 32 MB
Max shared memory allowed is 8192 MB
[Info] Increasing max shared memory segment size to 2048 MB
[Info] No need to increase max shared memory allowed
runtimepath=~/.vim,~/.vim/bundle/vim-cucumber,~/.vim/bundle/vim-fugitive,~/.vi
m/bundle/vim-git,~/.vim/bundle/vim-haml,~/.vim/bundle/vim-rails,/var/lib/vim/add
ons,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,/
var/lib/vim/addons/after,~/.vim/after
rake aborted!
wrong number of arguments (3 for 2)
/home/slugs/119251_3cc84db_3947/mnt/.gems/gems/devise-0.9.1/lib/devise/encryptors/bcrypt.rb:12:in `hash_secret'
/home/slugs/119251_3cc84db_3947/mnt/.gems/gems/devise-0.9.1/lib/devise/encryptors/bcrypt.rb:12:in `digest'
/home/slugs/119251_3cc84db_3947/mnt/.gems/gems/devise-0.9.1/lib/devise/models/authenticatable.rb:74:in `password_digest'
/home/slugs/119251_3cc84db_3947/mnt/.gems/gems/devise-0.9.1/lib/devise/models/authenticatable.rb:45:in `password='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2746:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2746:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2742:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2742:in `attributes='