Skip to content

Instantly share code, notes, and snippets.

@bookis
bookis / bookis_rails_template.rb
Created May 13, 2012 05:29
Spork + Guard + Bootstrap Rails Template
run "echo TODO > README"
run "rvm use 1.9.2"
run "rvm gemset create #{app_name}"
create_file ".rvmrc", "rvm use 1.9.2@#{app_name}"
gem "rspec-rails" , :group => [ :development, :test ]
gem "guard-rspec" , :group => [ :development, :test ]
gem "spork", "> 0.9.0.rc" , :group => [ :development, :test ]
gem "guard-spork" , :group => [ :development, :test ]
gem "factory_girl_rails" , :group => [ :development, :test ]
@bookis
bookis / consumer_template.rb
Created January 2, 2012 00:15
Homesteading Consumer App Template
# Put template stuff here
@bookis
bookis / mysql2 error
Created April 24, 2011 23:05
MySQL rails 3 and rvm : Library not loaded: libmysqlclient.18.dylib (LoadError)
/Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2.rb:7:in `require': dlopen(/Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
from /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2.rb:7:in `<top (required)>'
from /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `each'
from /Users/Bookis/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `block in require'
from /Users/Bookis/.rvm
@bookis
bookis / backup_heroku_db.rake
Created February 20, 2011 02:56
Making a rake tasks to capture Heroku pgbackup and push to S3
namespace :backup do
desc "backup db from heroku and send to S3"
task :push_to_s3 => :environment do
Rake::Task[:environment].invoke
require 'aws/s3'
require 'heroku'
APP_NAME = 'luna-sandals' # put your app name here
BACKUP_BUCKET = "#{APP_NAME}-db-backups" # put your backup bucket name here
file_name = "backup-#{Time.now.strftime('%s')}.dump"